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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DeanUW
Helper I
Helper I

RankX

Trying to rank sales agents based on year to date total.  The basic DAX function 

 

2022 GBA Rank = RANKX(ALL('Vendor Name'[Broker Full Name]), CALCULATE([2022 GBA Total]))
 
worked fine until I attempted to add another column to the table indicating if they are a shareholder or not. Now the RankX function is creating a seperate ranking for the shareholders and the non-shareholders but keeps them sorted based on their total.
 
ranking.png
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DeanUW , Rank will done for a column use in Rank inside the other column present in visual (mean rank will for broker full name inside Shareholder flag )

 

Try like

2022 GBA Rank = RANKX(ALL('Vendor Name'[Broker Full Name], 'Vendor Name'[Shareholder flag ]), CALCULATE([2022 GBA Total]))

 

USe summarize if the are from different tables

 

For Rank Refer to these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Best regards, members of the community.

I have this situation: I have tried to create a ranking ranking of the training programs that have the best score for an indicator called Varindice; But unfortunately it classifies me so that in some cases the score is repeated, and when I apply filters on the dashboard it does not take the classification based on it, but in a general way. I appreciate your support:

omarpardo5_0-1693740225820.png

When I apply a filter, it comes out like this, when it should be the 1 first in the row and it comes out is 4:

omarpardo5_1-1693740337718.png

amitchandak
Super User
Super User

@DeanUW , Rank will done for a column use in Rank inside the other column present in visual (mean rank will for broker full name inside Shareholder flag )

 

Try like

2022 GBA Rank = RANKX(ALL('Vendor Name'[Broker Full Name], 'Vendor Name'[Shareholder flag ]), CALCULATE([2022 GBA Total]))

 

USe summarize if the are from different tables

 

For Rank Refer to these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That worked thank you for the assist!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.