Average over time


I’m having a value
which gives me a power usage of some devices.

What I want is the an average per calender month (e.g. 1.10. - 31.10.).
I’ve experimented with
and I get values, but the make no sense. Can somebody help to build my monthly buckets?

Your query looks perfectly fine to me, but what may be puzzling you is the fact that Grafana will ask Prometheus to run this same query at every interval point of the chart, so you get a sliding 4w average. If you want to slice the calendar into months and have single average monthly value displayed per month, you need to set the interval value in the query option (bottom row) to 4w.

Sadly thats not what I’m looking for, since I want to have multiple averages from different month in one table/graph. E.g. power consumption from each month.

Could you sketch the table?