Forum Discussion
RANKX Help!
- 8 years ago
Hi All,
So, my boss was able to figure it out. the correct formula to use for my case is the following:
Rank = RANKX(ALLSELECTED('2821_410_700_150'[CompanyName]), CALCULATE(AVERAGE('2821_410_700_150'[TT100150_CD])),,ASC,Dense)-1
Thank you for all your imput and assistance.
I assumed that you only had 'Table[State]' and 'Table[CompanyName]' on the rows and 'Order Count' and 'Avg TAT BD' were already measures. So the Rank measure as written should work. I don't understand why you were getting an error. What specifically was the error you got, and what exactly was the measure you wrote?
mattbrice I have added the measure to do Avg TAT BD instead of formating it to be average in the matrix and now it let me use it in the RANKX formula however it is not populating the ranks correctly
- mattbrice8 years agoSolution Sage
What is ‘Avg TAT BD’ measure you wrote? Are there other table/page/report filters being applied to matrix?
- Ashish_Mathur8 years agoSuper User
- CourtneyB8 years agoFrequent Visitor
Ashish_Mathur I'm sorry, I do not know how to create a link for you to download the file. I have played around more with the data and got the formula to mostly work except there isnt a rank 1 populating. Here are some screenshot detail that hopefully will help
Current RANKX Formula
Visualization DetailsSnapshot of dataMeasure for Avg TAT BD being used
- Zubair_Muhammad8 years agoCommunity Champion
HI CourtneyB
Give this a shot
Rank = RANKX ( ALL ( '2821_410_700_150'[State], '2821_410_700_150'[CompanyName] ), AVERAGE ( '2821_410_700_150'[TT100150_BD] ) )