Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
adityah
Frequent Visitor

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 Code20222023
CAO11
CAT22
CFF33
CJA44
CJI55
CJO66
CMA77
CMI88
CMS99
CMT1010
CPC1111
O1212

 

I'm trying to rearrange the matrix row as

 

Sub Class Code20222023
CAO11
CAT22
CFF33
CJO66
CJA44
CJI55
CPC1111
CMA77
CMS99
CMT1010
CMI88
O1212

 

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 ACCEPTED SOLUTION

1. add a sort column

lbendlin_0-1732283763031.png

2. bring your data into a usable format by unpivoting

lbendlin_1-1732283799887.png

3. use the "sort a column by another colum"  function to sort the Sub Class Code by the Sort column.

lbendlin_2-1732285154603.png

4. Render the data in a matrix visual

 

lbendlin_3-1732285204230.png

 

 

 

 

View solution in original post

8 REPLIES 8
lbendlin
Super User
Super User

You want to change the sub class order but keep the value sort?  How would that work?

adityah
Frequent Visitor

edited

1. add a sort column

lbendlin_0-1732283763031.png

2. bring your data into a usable format by unpivoting

lbendlin_1-1732283799887.png

3. use the "sort a column by another colum"  function to sort the Sub Class Code by the Sort column.

lbendlin_2-1732285154603.png

4. Render the data in a matrix visual

 

lbendlin_3-1732285204230.png

 

 

 

 

adityah
Frequent Visitor

The problem is, the moment I remove the sort column from the visual, it reverts to alphabetical sorting of sub class code

cannot reproduce.  You need to use the menu item as indicated.

Anonymous
Not applicable

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.

Prasanthke
Frequent Visitor

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.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)