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
Crobby_09
New Member

Change Rank Dynamically to the Filters selected by the user

I have data consisting of route details of the customers and also their store scores. Pfa raw data with overall ranking for all the customers 

 

Crobby_09_2-1675073768106.png

 

This is the overall ranking for all the customers without selecting any filters. So when I select some filter like (Dist name, route code, store score) I want it to show the Rank according to the selected filter. Eg :

Crobby_09_3-1675073817714.png

 

The store score is based on some parameter which I calculated in a model using python. 

Currently it is string column in powerbi. I tried some dax but it was not succesful. kindly suggest me a solution. thanks

1 REPLY 1
amitchandak
Super User
Super User

@Crobby_09 , assuming store score is a measure or create a measure using sum/average

s1= Sum(Table[Store Sore])

 

rankx(allselected(Table[(Dist name], Table[route code], Table[store], Table[State]), [s1],,desc,dense)

 

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

Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=25627s

 

Power BI Rank Across dimension tables: https://youtu.be/X59qp5gfQoA

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

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.