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
Measure = VAR Total_Sum = (SUM('UPS'[1st_UPS]) + SUM('UPS'[2nd_UPS]))
VAR Non_Zero_Count = SUMX('UPS',IF('UPS'[1st_UPS] = 0, 0, 1) + IF('UPS'[2nd_UPS] =0, 0, 1))
RETURN
if(Non_Zero_Count=0,0,Total_Sum/Non_Zero_Count)
Solved! Go to Solution.
Hi @cghanta ,
Thanks for using Microsoft Fabric Community,
To ensure that the measure remains unaffected by selection, you can use the ALL function to remove filters from the 'UPS' table. Try modifying your measure as follows:
Measure =
VAR Total_Sum = SUMX(ALL('UPS'), 'UPS'[1st_UPS] + 'UPS'[2nd_UPS])
VAR Non_Zero_Count =
SUMX(
ALL('UPS'),
IF('UPS'[1st_UPS] = 0, 0, 1) + IF('UPS'[2nd_UPS] = 0, 0, 1)
)
RETURN
IF(Non_Zero_Count = 0, 0, Total_Sum / Non_Zero_Count)
Tested this with sample data, and it works as expected:
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best Regards,
Vinay.
Hi @cghanta ,
Thanks for using Microsoft Fabric Community,
To ensure that the measure remains unaffected by selection, you can use the ALL function to remove filters from the 'UPS' table. Try modifying your measure as follows:
Measure =
VAR Total_Sum = SUMX(ALL('UPS'), 'UPS'[1st_UPS] + 'UPS'[2nd_UPS])
VAR Non_Zero_Count =
SUMX(
ALL('UPS'),
IF('UPS'[1st_UPS] = 0, 0, 1) + IF('UPS'[2nd_UPS] = 0, 0, 1)
)
RETURN
IF(Non_Zero_Count = 0, 0, Total_Sum / Non_Zero_Count)
Tested this with sample data, and it works as expected:
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best Regards,
Vinay.
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!
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 20 | |
| 14 | |
| 11 | |
| 10 | |
| 9 |