Rolling AVG when there is missing data

I have a pivot table and I’m trying to calculate the 3 month average. Some users may have a blank for the month and the windowAVG function wasn’t working when there was missing data. I tried a different formula but it is still not working. For example Claudio had values for December and November.

(lead (({DL_calc}), [AvgSaleDate DESC], 2,[fieldman]) +lead (({DL_calc}), [AvgSaleDate DESC], 1,[fieldman])+ ifelse({DL_calc} = NULL,0,{DL_calc}))/3

image

Have you looked at this?