Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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])

 
ERROR: A single value for column 'Count' in table 'Test' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.