I got a lot of data that I am trying to analyze with a pivot table.

Now I am in need to be able to count different averages (for over 200 items), one with takes 0 values in the calculation and one that filters them out. And i need to be able to toggle this feature on/off with a button press.
Any way I can easily achieve this?

So for example:

Before After

Entry1 1 Entry1 1
Entry2 0 Entry2 0
Entry3 1 Entry3 1
Average: 1 Average: 0,66