Forum Discussion

adityah's avatar
adityah
Frequent Visitor
1 year ago
Solved

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

     

     

     

     

     

8 Replies

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

      • lbendlin's avatar
        lbendlin
        Super User

        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

         

         

         

         

         

  • Prasanthke's avatar
    Prasanthke
    Frequent Visitor

    Could you please explain on what basis you trying to sort the sub class

    • adityah's avatar
      adityah
      Frequent Visitor

      Its a custom sort order that is required. The report user wants to see his rows in this order as mentioned in the question.