By this I mean that this observed value is reset every day at 0:00 and then keeps increasing until it is reset again in the early hours of the next day.
The following image is how I would like it to appear. The raw data is a COUNTER, which keeps growing. What I would like to display would start at 0:00 each day and start counting again from zero, calculating the count value for that day.
For example, if the counter is a new user count, then I want to be able to observe how many new users there are at this point in the day (from 0 clock).
This behavior can (almost) be achieved with query like this
my_metric{} - last_over_time((
my_metric{} and on() (hour()==0 and minute()==0))[24h:])
Here we take current value of counter and subtract value of metric at 00:00.
Notice, result of this query near resets of counter will produce negative results. If you would like to avoid that, you can replace both occurrences of my_metric{}
with increase(my_metric[1y])
, but this will have negative impact on the performance of the query.
I'm not familiar with your data, and what you are trying to visualize, but I very much in doubt that your approach is correct.
Please consider showing something like "increase of counter every hour", because this is more informative way of showing counter data (not in all, but in most cases).