Hello
I history water volume every 10 second and try to get hourly water usage by using Range aggregation mode (Volmax - Volmin). I set the sample size = interval = 1 hour, so the result would be a series of 1 hour record which each one should be Volmax - Volmin in that 1 hour interval. But as it shows in the image result is totally wrong and in some row even 0!!!
I only get correct result when use Range mode in Tag Calculation query in report for one time period.
please Any Help
Did you ever figure out a solution to this? I'm running into the same thing... What is Range even supposed to do if it doesn't work as one would expect?
I gave up on history aggregation.
- It doesn't interpolate as one would expect so you don't get values on the hour. That means that the range aggregation (max - min) takes the first and last values that it finds in each hour rather than the "on-the-hour" calculated value.
- It doesn't extrapolate out to the start and end of the date range so it misses the start and end of the period too.
I've raised this in the forum a couple of times but never got a good response from IA. The documentation is weak also so we're left guessing how it's supposed to work.
Interesting, I had issues with the history aggregation but for different reasons.
Looks like @nader.chinichian mentioned that the aggregation worked if it was for just a single time period. Would looping through and calculating the range (one period at a time) help? If so, perhaps the code mentioned here could be applied to this scenario:
Note, this code was used to help resolve issues with daylight savings calculations and did so by looping through day by day (instead of using the history aggregation functions).