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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ff6d
Helper I
Helper I

Calculated measure showing top and bottom when slicing

Hi,

 

I created the following measure to show top 2 and bottom 2 salesmen (example "bottom 2";

 

Bottom 2 names =
VAR Sales = RANKX(ALL(Ark1[Name]);[Sale];;ASC)
RETURN
IF( Sales <= 3;[Sale];BLANK())

 

It works fine but when I slice on department "a" and "b" only the measure for top 2 works and bottom 2 doesnt show anything unless I "fix" the measure; "...IF( Sales <= 5;[Sale];BLANK())"

 

Thanks

 

regards,

 

Mikkel

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@ff6d,

 

It seems that you may use ALLSELECTED Function instead of ALL Function.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft,

 

Doesnt seem to work either.

 

I found the predeifned TopN filter in "fields" which seems to do the exact same thing "TopN bottom and top".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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