# Tag History calculate fill rate

**URL:** <https://forum.inductiveautomation.com/t/tag-history-calculate-fill-rate/72659>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [April 19, 2023, 5:26pm UTC](https://forum.inductiveautomation.com/t/tag-history-calculate-fill-rate/72659 "2023-04-19T17:26:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stuartd](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@stuartd](https://forum.inductiveautomation.com/u/stuartd)\
**Post date:** [April 19, 2023, 5:26pm UTC](https://forum.inductiveautomation.com/t/tag-history-calculate-fill-rate/72659/1 "2023-04-19T17:26:39Z")

</div>

Hello,  
I have a tag that we are currently storing history on, it is a fill % tag. I am looking at rough guessing a fill rate by taking the last 6 hours of data of that tag, take the range and and divide that by 6 to get a % per hour, and multiply that by the remaining % in the tank.  
When I do a tag query for history, and I select Range i get 360 rows, I was expecting to get 1 row based off the description.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c8afb82542a5fae9ede6f3e0270ccc76a16d43dc.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d96902d7c6ea238032eed7d80cb61fff4d87fd2.png)

Is there something I am missing on the best way to get this range? I would prefer to have this live as a tag instead of on a page only.

---

<div class="post-metadata">

**Author:** ![Emma\_Ngo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/emma_ngo/32/44559_2.png) [@Emma\_Ngo](https://forum.inductiveautomation.com/u/Emma_Ngo)\
**Post date:** [May 2, 2023, 10:58pm UTC](https://forum.inductiveautomation.com/t/tag-history-calculate-fill-rate/72659/2 "2023-05-02T22:58:00Z")

</div>

Hi [stuartd](https://forum.inductiveautomation.com/u/stuartd),  
The Range Aggeration Mode will return the range between the highest and lowest value for a given **time slice**. The number of values within a time slice is determined by the **Sample Size** properties.  
Because the Sample Size you selected is Natural , it will look up the logging rate for the queried tags and return results spaced apart at that rate.  
If you want to return the range value of the tag in 6 hours, you might change the sample size to Interval and set it to 6 hour.  
[https://docs.inductiveautomation.com/display/DOC81/Tag+History+Bindings+in+Vision](https://docs.inductiveautomation.com/display/DOC81/Tag+History+Bindings+in+Vision)
