How to include/replace null value columns with zero in pivot table average calculation
I'm attempting to get a monthly average in a pivot table. Not in the classic average aggregation, but a rolling time frame.
For example, Jan, Feb, Mar might contain 1 + NULL + 3. A normal average would be 3+1/2=2. I'm looking to compute 1+0+3 = 4/3 = 1.33
In the months where there are no values, I want to essentially use a zero.
I've tried CASE WHEN "measure" IS NULL then 0 ELSE "measure" END. This doesn't do anything.
Same with IFNull(measure,0). Doesn't do anything.
Suggestions from the guru's