Data dosnt add up when zooming out

When display 3h it looks ok…


when I zoom out to 30d… its incorrect… whats wrong?

This is the MSSQL-query for the graph.

SELECT
$__timeEpoch([TimeStamp]),
([CounterD] - Lag([CounterD] , 1) over (order by [TimeStamp]) ) * 2 * 60/1 as value,
[TimeStamp] as metric
FROM
[MSure].[dbo].[980000000CE3811D]
WHERE
$__timeFilter([TimeStamp])
ORDER BY
[TimeStamp] ASC

what version of grafana are you using?

I belive I am running v8.2.3

Here you can see that the scale isnt working when zooming out… I would like to see the energy consuption per day/week/month when zooming out… but its still per minute…