Exclude blank cells from weighted average in pivot table

19 views Asked by At

I am trying to produce a pivot table containing a weighted average of some data. To do this I am using an helper column in which I perform the multiplication. Then in the pivot table menu I create a calculated field resulting in the multiplication column being divided by the population (my weight in the average). As expected the weighted average for one city is the revenue of this city.

enter image description here

I want to get the weighted average of cities where the revenue is not blank. A simple average works but not when going through a calculated field because the value of the calculated field is 0 where I expect it to be blank, as illustrated hereafter :

enter image description here

I have tried replacing empty cells with ="" and playing with the display options but I feel like the fact that I perform a computation does yield a zero instead of a blank cell.

0

There are 0 answers