Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Team,
I have a small requirement. I want to use AverageX function considering the blank cell when calculating.
For better explanation i am attaching a simple sample set below.
| Month | Total=(A+B) | A | B |
| Oct | 2 | 2 | |
| Nov | 2 | 2 | |
| Dec | 3 | 1 | 2 |
| Expected Total | 2.333 | 0.33 | 2 |
In this my total is combinaton of Column A and B. If you look at the column A is having 2 blank cell and 3rd cell for Dec month is 1.
When applying AverageX function selecting 3month in slicer like Oct,Nov, Dec it is giving me 1, but my expectation is as it has to consider the total value 1 against 3month. So i am expecting the result of Total for column A would be 0.33 .
How Can achieve this, please help!
Regards,
Sagar
Solved! Go to Solution.
Hi @amitchandak ,
Got a way to bring the expected result i am looking for. I converted the blank cell value as Zero, then AverageX considered for all selected months and provided the desired result.
Added the ISBLANK function to address the blank cell value.
--------------------------
Thanks a lot for your valuable inputs.
Regards,
Sagar
@sagarsahoo_123 , Use calculate OR use measure in expression of sumx
Total = AVERAGEX(VALUES([Month]),calculate( sum[A]) ) )
Hi @amitchandak ,
Thanks for your quick response. But calculate function is already used in the measure but it is not giving the desired result for multiple month selection. The problem comes when the value for any month is blank.
please find the actual code used in the dashboard.
The above image is for the period of Oct to Dec. And in which both Nippon and Digi ACT HC count is <= Total HC. To bring average value for mulltiple month i have used AverageX function.
Code:-
Selecting only Nov month
Selecting Dec month
So single month selection, the value is coming correctly but problem comes when multiple month are selected and its average for Nippon HC is coming as 1, but it has to be 0.33 which is for 3 month. Though in Oct and Nov there is no value for Nippon HC but when averaging for all 3 months, it should consider the Oct and Nov as well.
Thanks for your support.
Regards,
Sagar
Hi @amitchandak ,
Got a way to bring the expected result i am looking for. I converted the blank cell value as Zero, then AverageX considered for all selected months and provided the desired result.
Added the ISBLANK function to address the blank cell value.
--------------------------
Thanks a lot for your valuable inputs.
Regards,
Sagar
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!