You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that I can change the interval of a time bucket.
But that is mathematically wrong in a case like this. In my case it is power consumption measured in Watts per hour, which is the most common way to represent power consumption of a device, so just setting the time bucket to "1 day" will only get me average power consumption during that day, not the overall power consumption of a device throughout the whole day.
A very simple example:
Let's say a device uses in average 13 Watts, which means actually: 13 W/h. So now I want to know how much did this device consume over the whole day: answer would be something like 312 Wh (13 W/h * 24h) if this device was power up the whole day. So simply doing an average over the whole day would still give me just 13 Watts, which is - of course - wrong.
Same like with speeds: if you're driving at ~50 miles/h your making ~200 miles in 4h, right?
I hope it becomes clearer now what I need to achieve.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have some smart home electricity meters, for which data gets scraped by prometheus and pushed to O2.
The values are coming in as Watts, which is just fine for aggregating up to 1 hour slots using
avg
aggregate function, like this:...query:
However, I also want to create analysis for daily, monthly and yearly power consumption, which requires 2-step aggregation:
Is there a mechanism or special aggregate functions that can help with this?
This use case may be applicable for other metrics as well that relate to a time span (miles per hour, meters per second, ...).
Beta Was this translation helpful? Give feedback.
All reactions