Forum Discussion
Create Rank column based on grouping and order by another column
- 6 years ago
Hi Anonymous ,
Create the following calculated column to your table:
Rankin = RANKX ( FILTER ( 'Table'; 'Table'[statement_id] = EARLIER ( 'Table'[statement_id] ) ); 'Table'[line_id]; ; DESC; DENSE ) - Anonymous6 years ago
Hi Anonymous ,
incase you wan to create a Calculated COlumn
RANKing Group = RANKX(FILTER('Table','Table'[statement_id] = EARLIER('Table'[statement_id])),'Table'[line_id],,DESC,DENSE)Incase you want to create a measure
RANKing OrderId = RANKX(FILTER(ALL('Table'[statement_id],'Table'[line_id]), 'Table'[statement_id] = MAX('Table'[statement_id])),CALCULATE(SUM('Table'[line_id])))
Regards,Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)Did I answer your question? Mark my post as a solution!
Hi Anonymous ,
incase you wan to create a Calculated COlumn
RANKing Group = RANKX(FILTER('Table','Table'[statement_id] = EARLIER('Table'[statement_id])),'Table'[line_id],,DESC,DENSE)
Incase you want to create a measure
RANKing OrderId = RANKX(FILTER(ALL('Table'[statement_id],'Table'[line_id]), 'Table'[statement_id] = MAX('Table'[statement_id])),CALCULATE(SUM('Table'[line_id])))
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hello how about it, how could you apply the calculated column you showed, but for more than one parameter? That is, I apply a RANK but according to four other columns (for example in my case YEAR, QUARTER, AGGLOMERATE and INCOME, and not just a column like the detailed one.
I thank you in advance! I can't find this solution anywhere.