Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 67 | |
| 65 | |
| 56 |