Forum Discussion
How to add Serial Number post custom sorting in Matrix
I have below matrix visual from table "Epic" .
"Work item id" column has unique value but "stank rank" can be duplicate.
Now I want to first do custom sorting on Stack Rank (Lowest to Highest) first and then Work Iteam ID (Lowest to Highest).
and on that sorted table it should add S.No in the first column.
I am able to do custom sort but I am not able to add measure of S.No that takes into account ordering of both column Stack rank and work item id.
Please help me here.
| Stack Rank | Work Item Id | Title |
| 275389732 | 1410679 | ABC |
| 275389462 | 1444887 | EFG |
| 275389462 | 1474419 | IGH |
| 275387640 | 1506653 | AA |
3 Replies
- amitchandakSuper User
SwatiAccenture , In matrix you can sort on Rows column and measure total , if the column is used. or on measure.
If you want to change the sort on matrix column(pivot) then you need a sort column
I have discussed in this video
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c - SwatiAccentureFrequent Visitor
amitchandak Problem is not with custom sort. I am able to do custom sort. it is adding serial number which is giving issues.
I am using below measure to add serial number.
Epic Serial Number = CALCULATE (COUNT ( 'Epic View'[Work Item ID] ),FILTER ( ALLSELECTED ( 'Epic View'), 'Epic View'[Work Item ID] <= MAX ( 'Epic View'[Work Item ID] ) ))So , post custom sort i see S.No are not in order. I want to create a measure that takes both stack rack and work item id into account and then add S.No to the rows - AnonymousNot applicable
Hi SwatiAccenture,
I'd like to suggest you take a look at the following link about using ISONORAFTER function to achieve sort by multiple fields values:
ISONORAFTER function (DAX) - DAX | Microsoft Docs
Regards,
Xiaoxin Sheng