Hello,
I’m relatively new to Grafana and have been sitting for 2 days now with a problem that I just can’t get on with.
It should be relatively simple, but somehow I do not get it.
I have an electricity meter reading, per “Bar gauge” I would like to display the consumption of the last 7 days (total consumption in 7 days).
If I look at the data per:
When windowing by week (1w), weeks are determined using the Unix epoch (1970-01-01T00:00:00Z UTC). The Unix epoch was on a Thursday, so all calculated weeks begin on Thursday.
1w = yours 7d, so aggregatewindow doesn’t group by your last 7 days, but by Unix epoch weeks - they start on Thursday, in your case 2022-10-16 and 2022-10-13 + you are using offset 4d, so you are “moving” these week 4 days ahead.
IMHO you don’t need aggregatewindow - you need only single value for last 7 days, not a timeseries.
IMHO you don’t need aggregatewindow - you need only single value for last 7 days, not a timeseries.
Your comment / solution approach is still not quite clear to me how I should implement.
Do you have another tip on how I should implement this? I would like to solve this as in the picture over a “bar gauge”, since later several measuring points are to be integrated.