Query every day and build the difference from it

Hi,
I´ve made a query from my heat-meter, every day at 0:00 its written in influxdb:

Is it possible to build the difference of each day and month, and write it in influxdb / show in a graph ?
29.01.2021 = 27.4222MWh
28.01.2021 = 27.4000MWh
→ 422,2kWh at 28th Jan.

and this per month ?

I don´t know how to calculate in grafana.

thank you

Hi,

You could achieve that using Influx query :

Good Luck

SELECT difference(distinct("value")) FROM "WMZ-Heizung" WHERE $timeFilter GROUP BY time(1d) fill(null)

for monthly I have to wait till 01.03.2021 :cowboy_hat_face:

1 Like