Forum Discussion
Anonymous
3 years agoNot applicable
Dynamic Ranking - Measure
Hi, I'm struggling to do dynamic ranking which changes based on my filters. I've managed to do a ranked column which works fine - just can't get my head around creating a measure to do the same....
- 3 years ago
Anonymous You may like this: To *Bleep* with RANKX! - Microsoft Power BI Community
Here is the CALCULATE approach:
Rank Measure = RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[%])),,DESC)And the No CALCULATE approach:
Rank No Calculate Measure = VAR __Name = MAX('Table'[Name]) VAR __Table = ADDCOLUMNS( ALLSELECTED('Table'), "__Rank", RANKX(ALLSELECTED('Table'),[%],,DESC) ) VAR __Result = MAXX(FILTER(__Table,[Name] = __Name),[__Rank]) RETURN __Result
Anonymous
3 years agoNot applicable
Hi,
Sorry in follow up to this question, when I drop the no calculate ranking into my table it resets all other columns until a slicer is selected, for example, I can see a list of office locations but all the %'s return 0% and ranking returns 1.
Any help would be great!
Many thanks