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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rich
Advocate I
Advocate I

Stop ALL function being filtered by a slicer

Feeling like I am missing something simple here...

 

I'm using the ALL function with a simple sum measure to stop the filtering of the 'Status' column:

 

Cost = Sum('Cost table'[Cost])

 

All Cost = [Cost](ALL('Cost table'[Status]))

 

However if I have a slicer for 'Status' on the page it will still filter the measure according to the slicer.

 

E.g. 

 

Cost      Status

10          Live

10          Closed

 

If I have a slicer for Status on the page and select only 'Live', I would expect the out come of the formula to still be 20, however I am getting 10.

 

Anybody know what I am missing?

 

The out come i am trying to achieve in the above scenario would be to display a card with the result of 50% i.e. [cost]/[all cost] = 10 / 20 = 50%, which cannot be done by simply turning off cross filtering in the 'Edit Interactions' menu...

1 REPLY 1
konstantinos
Memorable Member
Memorable Member

Your formulas are correct but...the cost formula that you have in the table behaves as it suppose to be. If you add the formula All cost in the table it should show 20..The are different formulas..so the devide will be Cost = 10 /  All Cost = 20 result = 0,5 or you can combine it to one

 

One formula

 

Cost Ratio = Var Cost = SUM('Cost Table'[Cost])

Var AllCost = CALCULATE( SUM('Cost Table'[Cost]);ALL('Cost Table'[Status]))
Return

DIVIDE( Cost ; AllCost )

 

With three measures 

Cost = SUM('Cost Table'[Cost])



All Cost = CALCULATE( SUM('Cost Table'[Cost]);ALL('Cost Table'[Status]))

Cost Ratio = [Cost] / [All cost ]

or if you expect zero values on cost 

Cost Ratio = Divide ( [Cost];[All Cost])

( I am using semicolon which you might use dot )

 

 

Either way is correct..and the slicer selection on status don't affect the result 

 

Untitled.png

 

 

 

 

Konstantinos Ioannou

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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