Aggregating time of day measurements to see when most power is used

Hi all,

I am trying create a visualisation to see, over a period of time, which are the hours of the day that most power is used. This is so that I can figure out how best to shift usage patterns to suit a time-of-day electricity tariff.

So far, I have been able to create an hourly consumption panel, but what I want to achieve is a panel that has 24 data points, one for each hour of the day, then plot min, max and average for each of those hours over a period of 7 days, 30 days etc.

It is this aggregation this I am struggling with. Any advice would be greatly appreciated.

Datasource is Influx