Forum Discussion
RANKX for Dynamic Rank
I have a long list of alarms that vary by region and location. I have to build a Pareto chart that allows the user to pick a certain region and/or location and see a pareto of the alarms for the selection (Count column below). I can't sort my data normally like I would with a static pareto chart, so my idea is to use a dynamic range that changes based on the filtered selection. I don't know if there is an easier way to do this?
I'm using RANKX, but I'm getting an error. I even made a smaller test dataset with only 9 values, and it's still not working. Count is a Whole Number in Power BI.
CODE: Count_Rank = RANKX(ALLSELECTED(Test, Test[Count])
https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
RankXDescMeasure = RANKX( ALL('Table'), CALCULATE( SUM('Table'[Value]) ), , DESC )Anonymous
1 Reply
- Greg_Deckler
Community Champion
https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
RankXDescMeasure = RANKX( ALL('Table'), CALCULATE( SUM('Table'[Value]) ), , DESC )Anonymous