Bar Chart Panel showing the energy consumption in intervals of 6 hours

Good evening,

I’m using Grafana 9.5.1 on a rpi4 running dietpi, to display the energy consumption of our household in various ways. The data gets logged into an influxdb, which is read by Grafana.

It already exists a panel showing me the overall consumption of each day, for the last 30 days. Now I was hoping to alter a copy of this panel to show the overall consumption of the following intervals per day:
00:00 - 06:00
06:00 - 12:00
12:00 - 18:00
18:00 - 24:00

To get this aggregated as an average value of each interval for f. e. the last 30 days instead of every day, would be a very great bonus, but I would be glad to at least achieve the per day solution.

I tried several things, but the nearest I got to the described panel is with this query:

select non_negative_difference(last(cumulative_sum)) from (
select cumulative_sum(non_negative_difference(last("value"))) from "autogen"."vz_measurement"
WHERE ("Standort"::tag = 'Standort' AND "Messwert"::tag = 'Zaehlerstand') AND $timeFilter  GROUP BY time(6h,-2h)
) WHERE $timeFilter GROUP BY time(6h,-2h)

Unfortunately the graph doesn’t show what I want to see:

As you can see, the x-axis labels are only switching between 06:00 and 12:00. I was expecting to see 4 different times per day like 06:00, 12:00, 18:00, 00:00. If I switch to the table-view I see exactly that:

Maybe someone can help me to get this panel working? :slightly_smiling_face: