Forum Discussion
Ranking on multiple columns
- Anonymous2 years ago
Hi vibhoryadav23 ,
1. If your third column is the result you expect, you can create a calculated column and use the rankx function to sort. For detailed information, please refer to the document: RANKX function (DAX) - DAX | Microsoft Learn.
Ranking = RANKX( FILTER( 'Table', 'Table'[Column1] = EARLIER('Table'[Column1]) ), 'Table'[Sales], , DESC, Dense )2. If you want to sort the data in the second column according to size, you can place the fields in the table visual and adjust the sorting through the small triangle under the column name.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
How are you wanting the ranking to work?
A, Product 1 = 1
A, Product 2 = 2
B, Product 1 = 3
B, Product 2 = 4
?
Sorry, the table posted was the wrong one. Updated the same. Column3, 'Rank' is the expected outcome based on first 2 columns. Thanks.