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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
gaiusgw
Helper III
Helper III

Matrix sort columns in reverse order for text

There seem to be quite a lot of threads about how to reverse sort columns for dates but I have text. Is there anyway to reverse sort the columns headers I have in the attachment? So in order of 16SU down to 14CS. 

 

gaiusgw_0-1699385992575.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @gaiusgw,

You can refer to the following blog to create a custom table with column value and numeric index field. Then you can use this index as column 'sort order' of the column field and build relationship to your table field.

Custom Sorting in Power BI  

After these steps, you can use the new table field replace the raw table field to use on matrix with custom sort effect.

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @gaiusgw,

You can refer to the following blog to create a custom table with column value and numeric index field. Then you can use this index as column 'sort order' of the column field and build relationship to your table field.

Custom Sorting in Power BI  

After these steps, you can use the new table field replace the raw table field to use on matrix with custom sort effect.

Regards,

Xiaoxin Sheng

audreygerred
Super User
Super User

Hello! Create a table with the items that are appearing in your colums and add a sort order and put 1 through whatever number you want. In the new table, select the column that has all of the names in it and go to Column tools tab, then select  Sort by Column and select the column you added with the sorting. Then, make a join from your new table to your existing table and use the names from the new table for the column of your matrix since they are sorted in the order you need.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.