Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
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?
Solved! Go to Solution.
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
Could you please explain on what basis you trying to sort the sub class
Its a custom sort order that is required. The report user wants to see his rows in this order as mentioned in the question.
You want to change the sub class order but keep the value sort? How would that work?
edited
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
The problem is, the moment I remove the sort column from the visual, it reverts to alphabetical sorting of sub class code
Hi @adityah ,
Please check if you are using sort by column correctly, I have made simple sample, you can check the attachment.
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
cannot reproduce. You need to use the menu item as indicated.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
3 | |
3 | |
3 |
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
7 |