I have a pivot table to aggregate some financial balance by counterparties. Link to the example.
Over time, it's expected that the aggregate amount for most of the parties will be 0. I want to show only those rows in the pivot table where the aggregate is nonzero. Otherwise, my pivot table will be cluttered by tons of empty zero rows.
In the above example, this corresponds to hiding John, Mary, and Thomas records.
Is there a way to accomplish this?
You can achieve this by adding a filter on top of your pivot table.
=ABS(B3) + ABS(C3) + ABS(D3) > 0See the example.
you could use a double query like:
=QUERY(QUERY(Transactions!A1:C,
"select A,sum(B)
where A is not null
group by A
pivot C", 1),
"where Col2>0
or Col3>0
or Col4>0", 1)

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With