# Update the sum of pieces on table filter

**URL:** <https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880>\
**Category:** Ignition\
**Created:** [April 3, 2026, 2:04pm UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880 "2026-04-03T14:04:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [April 3, 2026, 2:04pm UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/1 "2026-04-03T14:04:30Z")

</div>

I’m working with a Table componant that includes a _Pieces_ column, and I want to display the total sum of that column at the top of the table.

Right now, I’m using a table filter‑change script to calculate the sum, but the value doesn’t always update correctly — sometimes it doesn’t refresh, and other times there’s a race condition because the script fires continuously.

There are several filters applied to my Power Table, including a multi‑select dropdown and a “Show All” toggle.

Is there an alternative way to calculate the sum of the _Pieces_ column without relying on the Power Table’s filter‑change script?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 3, 2026, 3:14pm UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/2 "2026-04-03T15:14:07Z")

</div>

I would do an expression binding checking the len of props.filter.results.data

`len({../Table.props.filter.results.data})`

Then a script transform that sums the filtered result data if the value of the expression is \>0

Else do the sum on the table.data

This way the expression will fire when the filtered data size changes

---

<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:** [April 3, 2026, 4:09pm UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/3 "2026-04-03T16:09:39Z")

</div>

Are the filters external to the table? Are you trying to show the total in an extra row?  
Describe your data flow or b I ndings in more detail.

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [April 6, 2026, 10:21am UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/4 "2026-04-06T10:21:05Z")

</div>

here is table, top of the view I am displaying SQDT, PCS and total records, which are not updating correctly or sometimes having race condition if we filter from table filter

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/0/90872e0b976627a1fe29569767d9e048647a2c16.png)

the filter dropdown is bound to data using an SQL query.

The **SQFT** and **PCS** labels have transformation scripts that calculate their respective values. Additionally, on every table filter change, there is logic in place to recalculate **SQFT** , **PCS** , and **Total Records** based on the currently filtered result set.

---

<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:** [April 6, 2026, 10:56am UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/5 "2026-04-06T10:56:53Z")

</div>

Do you have `props.filter.results.enabled` set to `true` ? If not, turn it on.

Then, your summary labels at the top can uses the table's `props.filter.results.data` as their binding source. That should eliminate race conditions.

---

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [April 6, 2026, 12:46pm UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/6 "2026-04-06T12:46:20Z")

</div>

Any alternative for table filter change script?

---

<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:** [April 6, 2026, 6:49pm UTC](https://forum.inductiveautomation.com/t/update-the-sum-of-pieces-on-table-filter/114880/7 "2026-04-06T18:49:10Z")

</div>

No, the answer is to not use that event. Use the result data delivered from the front end (browser) specifically for this kind of usage.
