Interval variable for instant values

Hi, can someone help to find an appropriate solution to be able to calculate the sum of values with the interval variable?

I have a metric health_checker that reports only 2 values - 0 and 1

Also here is my query

sum by(device,email)(last_over_time(health_checker{job="JobName"}[1d]))

Without pressing the Instant button values are not summarised. Like on the screenshot below.

If Instant is enabled then values are summarised and instead of showing three rows with value 1, it shows one correctly summarised row with value 3, and all is OK except interval, I need to hardcode it, also when I’m using $interval variable instead of hardcoded interval I am unable to see any data.

My goal is to summarise values and be able to view them in time range using the $interval variable

@menvol3 the instant query shows the last value returned for each series.

The $interval is automatically calculated by the time range for the dashboard, how large of a time range are you querying? The interval can be adjusted in the query options tab of the query.

I often find it useful to try the query inspector button to take a look at the data points returned by each query.