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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JG939
Frequent Visitor

Question: How to have a dynamic ranking based off of filter selection

Data:  

LocationSales RankCost RankCustomer Satisifcation RankInventory RankAverage RankOverall RankAverage Rank FormulaOverall Rank Formula
1891119849.755=(C3+D3+E3+F3)/COUNT(C3:F3)=RANK.EQ(G3,$G$3:$G$9,1)
23321297361=(C4+D4+E4+F4)/COUNT(C4:F4)=RANK.EQ(G4,$G$3:$G$9,1)
3443159639.52=(C5+D5+E5+F5)/COUNT(C5:F5)=RANK.EQ(G5,$G$3:$G$9,1)
45541895433=(C6+D6+E6+F6)/COUNT(C6:F6)=RANK.EQ(G6,$G$3:$G$9,1)
5775199448.754=(C7+D7+E7+F7)/COUNT(C7:F7)=RANK.EQ(G7,$G$3:$G$9,1)
6886209251.56=(C8+D8+E8+F8)/COUNT(C8:F8)=RANK.EQ(G8,$G$3:$G$9,1)
7997229355.257=(C9+D9+E9+F9)/COUNT(C9:F9)=RANK.EQ(G9,$G$3:$G$9,1)
 

The goal I have in mind is a calculated column that changes the average rank formula based off of the selected criteria ie if you only wanted to rank a locatoin based off of Sales Rank and Inventory Rank. The dashboard would allow you to select any type of criteria and then have a calculation based off that selection, then rank it. 

2 REPLIES 2
amitchandak
Super User
Super User

@JG939 , not very clear

you can have dynamic rank measure like

Sales Rank = rankx(allselected(Table),[sales])

 

Overall Rank = ([Sales Rank]+[Cost Rank]+ [Customer Satisifcation Rank]+[Inventory Rank])/4

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

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

As I said in my comments, I know how to do what you described but I do not know how to make it dynamic, for instance if you wanted a rank with only two of the four categories.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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