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.
DAX0110 I didnt have anything established as i kept getting errors but with mattbrice's formula and adding Average() it just gave me all Rank 1s. I dont know if it makes a difference but each row in the data gives the order level Turn Time, so when i pull that field into the matrix i have it average instead of sum.
Rank = RANKX(ALL('2821_410_700_150'[CompanyName]),AVERAGE('2821_410_700_150'[TT100150_BD]))
- mattbrice8 years agoSolution Sage
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?
- CourtneyB8 years agoFrequent Visitor
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?