Gauge and derivative values leads to unintended not-quite-averaging


I am using Grafana v8.2.3 in my home automation on an older version of Debian Linux. I have an InfluxDB time series that is filled from my electrical meter with the meter countings, e.g. the meter value in Wh in a strictly monotonously growing row of values. Since my house is electrically heated, the load has a high variance.

To get a reading in Watt, I need to use derivative(1h) in the selector:

This looks reasonable to me.

Now I want to have a gauge, giving me the latest value from this time series.

This does not look reasonable for me. The value shown in the gauge varies depending on the absolute time range selected for the dashboard. I would like to post more screenshots, but the Forum doesn’t allow me to. I have tweeted the two pictures on my Zg2spielt account on Twitter.

When I select the absolute time range of “last 5 Minutes”, the gauge displays “72W”, and when I select “last two days”, I get “20W”. This is not even an average. I am pretty sure that I used more power than 20W on average in the last two days to heat my house.

How can I have a gauge from a time series using the derivative selection which displays the last derived value?