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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
akshay2204
Frequent Visitor

RankX

Hi,

I have used rankx function to calculate the top customers by GM Impact. I need to show top 5 customers 

As you see in this image  1 when no filter is selected from filter pane we can see all the ranks 

akshay2204_0-1692364662572.png  

 

But as I select top 5 using Rank_Gm measure then I can only see 4 records I need to see 5 records

akshay2204_1-1692364741050.png

The dax used for rankx is as follows

Rank Gm =
 RANKX(ALLSELECTED(Sales[Customer]),[GM_Imp],,Desc,Dense)

 

 

3 REPLIES 3
Anonymous
Not applicable

Hello @akshay2204  use TOP N in advanced filtering option. This will solve your problem.

v-yanjiang-msft
Community Support
Community Support

Hi @akshay2204 ,

If the problem has not been resolved, would you like to provide the pbix without sensitive data, I can't reproduce the problem.

 

Best regards,

Community Support Team_yanjiang

mlsx4
Memorable Member
Memorable Member

Hi @akshay2204 

 

Maybe your problem is that it is counting the total as one row (even if you have hidden it). Here is a possible solution: https://community.fabric.microsoft.com/t5/Desktop/RANKX-for-Top-5-Facilities-by-number-of-successes/...

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.