How can i fetch all values from every day between 7pm till 7am

i have the sum off my overal usage which adds all the time. now i try to get the values off my energy usage during night time… and from there the average.

i tried the following and it looks not to bad, but i need the values (so every day one value how much i was using in this time) - (aka it would be the difference from 7pm value to 7am value (next day) and so on

actualy i need one value: average usage over last x days between 7pm till 7am

thanks for any help

my work till now… no clue if this is correct


Hi @sonnenterasse

Your hourSelection() function will not do what you want it to do because it is spanning the overnight hours. If you wanted, for example, 7 AM to 7 PM, then this would work:
|> hourSelection(start: 7, stop: 19)

Here is a thread from years ago on this topic. You may be able to search around and find a better workaround.