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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
mb0307
Responsive Resident
Responsive Resident

Rank bottom filter

Hi All,

 

I have created a simple rank measure:

 

RANKX( ALL( CountryTable[Market] ), [Variation] )

 

to show TOP 5 market I am applying visual filter.

 

but how to get BOTTOM 5 based on the visual filter applied to ignore certain markets.

 

Thanks in advance.

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

Hi @mb0307 ,

 

Please sort by [Variation] in ascending order:

Rank = IF([Variation]<>0 , RANKX(FILTER( ALL( CountryTable[Market] ), [Variation]<>0), [Variation],,ASC,Dense),BLANK())

Then apply the measure to visual-filter pane, condition is <=5 & <> Blank:

Eyelyn9_0-1653983391894.png

Best Regards,
Eyelyn Qin
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

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @mb0307 ,

 

Please sort by [Variation] in ascending order:

Rank = IF([Variation]<>0 , RANKX(FILTER( ALL( CountryTable[Market] ), [Variation]<>0), [Variation],,ASC,Dense),BLANK())

Then apply the measure to visual-filter pane, condition is <=5 & <> Blank:

Eyelyn9_0-1653983391894.png

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

amitchandak
Super User
Super User

@mb0307 , One is create a new Tank and use that in filter

RANKX( ALL( CountryTable[Market] ), [Variation],,asc,dense )

 

or

 

RANKX( ALLSELected( CountryTable[Market] ), [Variation] )

 

or you can use advance -> top N in visual level filter

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak thanks

It did not work.

 

3rd column is Rank.  I want to pick the highlighted 5 countries.    I already have a visual filter to ignore all 0 in middle column.

 

mb0307_0-1653550963921.png

If i am using TOP N because of my remove 0 visual filter, it doesn't show anything as they are hidden. 

 

Any fix please? 

 

Helpful resources

Announcements
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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors