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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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