Forum Discussion
Custom Sort for PBI matrix rows
Hi Guys,
Posting this here since none of the previus solutions seem to be working. I have a power bi matrix which looks like this:
| Sub Class Code | 2022 | 2023 |
| CAO | 1 | 1 |
| CAT | 2 | 2 |
| CFF | 3 | 3 |
| CJA | 4 | 4 |
| CJI | 5 | 5 |
| CJO | 6 | 6 |
| CMA | 7 | 7 |
| CMI | 8 | 8 |
| CMS | 9 | 9 |
| CMT | 10 | 10 |
| CPC | 11 | 11 |
| O | 12 | 12 |
I'm trying to rearrange the matrix row as
| Sub Class Code | 2022 | 2023 |
| CAO | 1 | 1 |
| CAT | 2 | 2 |
| CFF | 3 | 3 |
| CJO | 6 | 6 |
| CJA | 4 | 4 |
| CJI | 5 | 5 |
| CPC | 11 | 11 |
| CMA | 7 | 7 |
| CMS | 9 | 9 |
| CMT | 10 | 10 |
| CMI | 8 | 8 |
| O | 12 | 12 |
I tried creating a new table with sort order column and linking it through sub class code. It still doesn't sort according to sort order column. I'm not sure if anyone has a workaround?
1. add a sort column
2. bring your data into a usable format by unpivoting
3. use the "sort a column by another colum" function to sort the Sub Class Code by the Sort column.
4. Render the data in a matrix visual
8 Replies
- lbendlinSuper User
You want to change the sub class order but keep the value sort? How would that work?
- PrasanthkeFrequent Visitor
Could you please explain on what basis you trying to sort the sub class
- adityahFrequent Visitor
Its a custom sort order that is required. The report user wants to see his rows in this order as mentioned in the question.