Update the sum of pieces on table filter

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?

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

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.