Forum Discussion
Calculate average and include blanks
I have encountered a similar scenario where Power BI's AVERAGEX() is excluding blank and nulls from average calculation.
How can I modify my measure to include these blank or null values when calculating the average?
I've shared the link to the pbix file for reference. Any guidance on this would be greatly appreciated.
Thank you!
Ashish_Mathur dsalony SOppeneer Anonymous
ZEB The approach I took was manually taking the sum of values divided by the count of values and blank values, so something like: SUM([values]) / ( COUNT([values]) + COUNTBLANK([values]) ). This would be in your CALCULATE function with appropriate filters. I suppose in your case this would then be the sum of [Opportunities] divided by the appropriate number of days from your CalendarTable.