Reputation: 7192
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?
Upvotes: 2
Views: 21780
Reputation: 7192
You can achieve this by adding a filter on top of your pivot table.
=ABS(B3) + ABS(C3) + ABS(D3) > 0
See the example.
Upvotes: 6
Reputation: 1
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)
Upvotes: 3