I’ve been playing with grafana for a few days and I am facing a dilemma
How could I make the difference between the minimum of the next hour and the minimum of the previous one?
I’ve a sensor counter (Energy), and till now i’m calculating kwh with this query:
SELECT (last(value)-first(value)) FROM Usage WHERE $timeFilter GROUP BY time(1h)
Generally it seems to be fine but sometimes there are cases like these:
As you can see, there is a difference, lost, between 19:41:38 (last value) and 20:00:34 (first value next hour).
So, I suppose, the best calculation should be between the first value of the hour and the first value of the next hour.
Is it possible? How?
Thanks a lot!