Forum Discussion

gaiusgw's avatar
gaiusgw
Helper III
2 years ago
Solved

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. 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    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

2 Replies

  • 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.

  • Anonymous's avatar
    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