# Table calculations

**URL:** <https://forum.inductiveautomation.com/t/table-calculations/83602>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [December 29, 2023, 1:43pm UTC](https://forum.inductiveautomation.com/t/table-calculations/83602 "2023-12-29T13:43:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [December 29, 2023, 1:43pm UTC](https://forum.inductiveautomation.com/t/table-calculations/83602/1 "2023-12-29T13:43:57Z")

</div>

Hi,

I am looking to calculate the amount used in a graph or table.  
I am recording the tag history but would like the be able to see how much was used in that specific time period but i cant add the values together i need to know the difference from the first and last reading if that makes sense?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 29, 2023, 2:02pm UTC](https://forum.inductiveautomation.com/t/table-calculations/83602/2 "2023-12-29T14:02:05Z")

</div>

> [@Alex\_Evans](#):
>
> how much was used in that specific time period

Are you asking for the magnitude of range axis or the duration of the domain axis?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 29, 2023, 2:09pm UTC](https://forum.inductiveautomation.com/t/table-calculations/83602/3 "2023-12-29T14:09:32Z")

</div>

> [@Alex\_Evans](#):
>
> the difference from the first and last reading if that makes sense

Sounds like you are recording a totalizer. The most reliable approach is to gather all of the readings between start and end timestamps (or one outside the bounds in each direction) and compute the deltas for each sample. Account for rollover (odometer-style totalizers) in each, interpolate at the boundaries, discard the impossible/odd values, then add up all of the valid deltas.

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [January 4, 2024, 4:31pm UTC](https://forum.inductiveautomation.com/t/table-calculations/83602/4 "2024-01-04T16:31:06Z")

</div>

Sorry for the late reply, ended up using a power table dataset and linking the pop up calendar to the chart so the selected date range would just calculate the minimum and maximum value and give the usage of that period chosen on the chart.
