Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
cghanta
Helper I
Helper I

Power BI - how to all ALL(Table) to a measure - remove all filters

How can I add ALL(UPS) to the following measure, so the card value will remain the same all the time:
The value is changing when rows of a table is selected.

 

 

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)

1 ACCEPTED SOLUTION
v-veshwara-msft
Community Support
Community Support

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:

vveshwaramsft_0-1743398893317.png  vveshwaramsft_2-1743398919827.png

 

 

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.

View solution in original post

2 REPLIES 2
v-veshwara-msft
Community Support
Community Support

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:

vveshwaramsft_0-1743398893317.png  vveshwaramsft_2-1743398919827.png

 

 

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.

Thank you! @v-veshwara-msft

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.