You might be right, i recall tableau returning incorrect values due to empty fields, i think it takes a different approach than what we assume. To ensure correct results i usually add ifnull(meassure,0) to everything just to be aware of whats happening.
do you have tips can add ifnull(measure,0) easily to everything?
I think manually create calculated fields one by one is not a good approach.
neither is toying with the workbook's source code but it gets the job done
Other than that, i think it can be easily fixed from the data source it self.
There is no bug in WINDOW_AVG; remember that NULL is not a value contributing to the result evaluation.
From what you describe I think you want to use data densification and ZN() aggregates.