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
qmestu
Helper III
Helper III

Calculating a measure ignoring slicers

Hi,

 

I have the following table (a simplified example is below). I also have a slicer that can select between the categories A,B,C,D. I'm trying to get the ratio of each category when i change the selected value in the slicer.  For example, selecting A would produce the result of 0.33.



Measure=divide(calculate(sum(table[value]),table[ID]=1),calculate(sum(table[value]),table[ID]=1,table[category]="Total")))

I believe this doesn't work because the slicer takes precedence of the calculation of the measure. I've tried using the ALL function but it didn't work either.

 

IDCategoryValue
1A5
1B5
1C2
1D3
1Total15

 

Thanks for reading and any help you may provide!

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

Hi , @qmestu 

Here are the steps you can refer to :

(1)My test data is the same as yours.

(2)We can click "New Measure" to create a measure :

Measure = var _total = CALCULATE(SUM('Table'[Value] ),ALL('Table'))
return
DIVIDE( SUM('Table'[Value]) , _total)

(3)Then we put the fileds we need on the visual , and we will meet your need :

vyueyunzhmsft_0-1667525010278.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @qmestu 

Here are the steps you can refer to :

(1)My test data is the same as yours.

(2)We can click "New Measure" to create a measure :

Measure = var _total = CALCULATE(SUM('Table'[Value] ),ALL('Table'))
return
DIVIDE( SUM('Table'[Value]) , _total)

(3)Then we put the fileds we need on the visual , and we will meet your need :

vyueyunzhmsft_0-1667525010278.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

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.

Top Solution Authors
Top Kudoed Authors