Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
In the attached PBIX, I am trying to create a measure for the Dynamic Rank All Card that will display the Rank for the Hospital ID but all it to change based on any other Slicer Selected. Currently, I am using the following formula for RANK in the Card.
Solved! Go to Solution.
Morning @bprokop
Try this measure...
VAR SelectedHospitals =
CALCULATETABLE (
ALLSELECTED ( Data ),
REMOVEFILTERS ( Data[Hospital ID] )
)
RETURN
RANK (
SKIP,
SelectedHospitals,
ORDERBY ( Data[National Rank], ASC )
)
I think this is the desired result?
There is absolutely no relation between the text of your message and data in the file. When i filter on UF Health Jacksonville, i do not see either 3636 or 2317 anwhere in the Table visual. All i see is 49.
Hi Ashish,
That appears to be one of the older files I had posted with a different question. The file should be the one labeled Sample Data - Dynamic Rank. I checked the google drive link and it brought me to the file. Below is what you should see when opened.
Thanks
Brian
Hi,
I still see the same old file there.
Hi Ashish,
Try the link below. I reposted it to Google Drive.
https://drive.google.com/file/d/1I8KYamW8BQe89fNQLKBzSoQl7I667aLt/view?usp=sharing
Am unable to solve it.
😅
@Ashish_Mathur that is so unlike you! You usually clear up the last few details after someone else does the heavy work! Take your moment, dig in and fix this!!! Shine, brother, shine! 😄
@bprokop do me a favor. PM me with the details and the ability to download some data to play with this. I'll solve this.
Hi @bprokop
There are some "new" (within the last year) window functions that are excellent at determining RANK based on selections. Take a look at those.
Morning @bprokop
Try this measure...
VAR SelectedHospitals =
CALCULATETABLE (
ALLSELECTED ( Data ),
REMOVEFILTERS ( Data[Hospital ID] )
)
RETURN
RANK (
SKIP,
SelectedHospitals,
ORDERBY ( Data[National Rank], ASC )
)
I think this is the desired result?
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 39 | |
| 29 | |
| 24 |