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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
themoosegoose
Frequent Visitor

ALLSELECTED doesn't work with FILTERS

How can ALLSELECTED work when I filter a value included in one of the measures required to calculate the percentage?

 

Number of Visits

# Visits = CALCULATE(SUM(Main[VALUE]),ALL(Main[OrderCode]), FILTER(ALLSELECTED(Main),Main[OrderCode]= 1))

 

Number of Incomplete Visits

# Visits Incomplete = CALCULATE(SUM(Main[VALUE]), ALL(Main[OrderCode]), FILTER(ALLSELECTED(Main),Main[OrderCode]= 2))

 

Measure

Measure = IF(MIN(Main[OrderCode]) = 3 , [# Visits Incomplete]/[# Visits], BLANK())

Sample1.PNG

 

Sample2.PNGSample3.PNG

 

 

Thank you

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @themoosegoose

When modifying two measures as below, I can calculate the percentage.

# Visits = CALCULATE(SUM(Main[VALUE]),FILTER(ALL(Main),Main[OrderCode]= 1))

# Visits Incomplete = CALCULATE(SUM(Main[VALUE]), FILTER(ALL(Main),Main[OrderCode]= 2))

1.png

 

Best Regards

Maggie

 

 

Using ALL would aggregate the numbers in the roll up level. You can't see that in the sample above, but if you add dates (which is what I have in my real report), you'll be able to see the issue. Is there another option?

Hi @themoosegoose

Could you show me some example dataset which will effect the result you want for better analysis?

 

Best Regards

Maggie

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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