Forum Discussion
alexei7
7 years agoContinued Contributor
RANKX DAX column help
Hi, I'm trying to create a column that will rank Invoices across Suppliers. This needs to be a column so that I can then use this Rank column to create a cumulative total and then (hopefully a meas...
- 7 years ago
As a calc column,,,try
Calc Column = RANKX ( Table1, CALCULATE ( SUM ( [Invoice Amount] ), ALLEXCEPT ( Table1, Table1[SupplierCode] ) ), , DESC, DENSE )
v-frfei-msft
7 years agoCommunity Support
Hi alexei7,
To create two measures as below.
total = CALCULATE(SUM(Table1[Invoice Amount]),ALLEXCEPT(Table1,Table1[SupplierCode]))
rankx = RANKX(ALLSELECTED(Table1[SupplierCode]),[total],,DESC,Skip)
Also to create a calculated columm worked well.
rankxcc = RANKX(ALLSELECTED(Table1[SupplierCode]),[total],,DESC,Skip)
For more details, please check the pbix as attached.
Regards,
Frank