Forum Discussion
Display Rank Value In A Card While Including and Excluding Slicers
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.
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?
9 Replies
- littlemojopuppyCommunity Champion
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.
- littlemojopuppyCommunity Champion
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?
- Ashish_MathurSuper User
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.
- bprokopFrequent Visitor
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
- Ashish_MathurSuper User
Hi,
I still see the same old file there.