Forum Discussion
RANKX Issues - Beginner woes
Thank you very much.
If you are look at the bottom of your table, rank 47 is appearing twice and the total sales value is different so someting tells me it is ranking something else and not the total sales value. At any rate I believe the highest rank will be 33.
What I am hoping for is a proper ranking of the total sales as depicted in the attached images.
top of tablebottom of table
Hi Anonymous ,
Sorry for our late reply, we can use the following measures to meet your requirement:
Rank_SUM =
RANKX (
CALCULATETABLE (
DISTINCT ( 'RankingTest'[ItemNumber] ),
ALLSELECTED ( 'RankingTest' )
),
CALCULATE ( [TotalSales_SUM] ),
,
ASC,
DENSE
)
Rank_SUMX =
RANKX (
CALCULATETABLE (
DISTINCT ( 'RankingTest'[ItemNumber] ),
ALLSELECTED ( 'RankingTest' )
),
CALCULATE ( [TotalSales_SUMX] ),
,
ASC,
DENSE
)
Rank_CASUM = RANKX (
CALCULATETABLE (
DISTINCT ( 'RankingTest'[ItemNumber] ),
ALLSELECTED ( 'RankingTest' )
),
CALCULATE ( [TotalSales_CASUM] ),
,
ASC,
DENSE
)
Rank_CASUMX =
RANKX (
CALCULATETABLE (
DISTINCT ( 'RankingTest'[ItemNumber] ),
ALLSELECTED ( 'RankingTest' )
),
CALCULATE ( [TotalSales_CASUMX] ),
,
ASC,
DENSE
)
Best regards,
- Anonymous6 years agoNot applicable
Thank you for the response.
Unfortunately, it is not working in my powerBI file.
Possibly my file is now corrupted! I have used the function in a different situation and it worked however in this instance it is not working. I settled for using the RANK.EQ alternative, only it added a few more steps to get to the result I wanted.