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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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