# The Range Aggregation doesn't work correctly

**URL:** <https://forum.inductiveautomation.com/t/the-range-aggregation-doesnt-work-correctly/65645>\
**Category:** Ignition\
**Created:** [October 25, 2022, 12:06pm UTC](https://forum.inductiveautomation.com/t/the-range-aggregation-doesnt-work-correctly/65645 "2022-10-25T12:06:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 25, 2022, 12:06pm UTC](https://forum.inductiveautomation.com/t/the-range-aggregation-doesnt-work-correctly/65645/1 "2022-10-25T12:06:24Z")

</div>

Hi  
As it shown in following screen shot, I try to get Delta value(Max -Min) from a tag in every 10 min interval, but the result it always zero for me.  
I really hard time to understand what I did wrong. Obviously I have value in those ranges.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/221874cf653a3799ba33a6d0af68f2a396305875.png)

If I use system.tag.queryTagCalculations() I get correct result in that time range.

---

<div class="post-metadata">

**Author:** ![obober](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/obober/32/67865_2.png) [@obober](https://forum.inductiveautomation.com/u/obober)\
**Post date:** [October 26, 2022, 10:49pm UTC](https://forum.inductiveautomation.com/t/the-range-aggregation-doesnt-work-correctly/65645/2 "2022-10-26T22:49:13Z")

</div>

Is the behavior the same if you use the Query Mode `PointCount`?

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 27, 2022, 6:15am UTC](https://forum.inductiveautomation.com/t/the-range-aggregation-doesnt-work-correctly/65645/3 "2022-10-27T06:15:51Z")

</div>

Yes, it is the same, but if I change the query mode to calculation it seems it works.  
Interestingly, CountOn/Off, and Average work perfectly.  
It is really easy to recreate with one tag to add history to the Onchange mode.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 31, 2022, 6:53am UTC](https://forum.inductiveautomation.com/t/the-range-aggregation-doesnt-work-correctly/65645/4 "2022-10-31T06:53:41Z")

</div>

Any update on this?
