Forum Discussion

MarlenePirker's avatar
3 years ago
Solved

Flexible matrix sorting

Hello! 

 

I created a matrix and now want to sort the countries like in the image. I already created a index but I dont understand how to sort the matrix using the index and then hide the index column. 

 

Is that even possible? I found similiar questions but none of them really helped me... 

 

Thank you so much. 

 

  • lukiz84's avatar
    lukiz84
    3 years ago

    In PowerBI set this field in your country table on the "Customer Country" column to your "Customer Country Index".

     

     

    When you put Customer Country on your Matrix and below columns from other connected tables, then afterwards sort your matrix by"Customer Country". And PowerBI automatically uses the Index to sort it, even if you don't put it there.

     

    You can also send me a message, if you are still stuck and want to write about it in German 😉

     

    BR

     

     

7 Replies

  • lukiz84's avatar
    lukiz84
    Memorable Member

    Hi,

     

    in your Table set the "SortByColumn" to the "Customer Country Index" field

     

    BR

  • Yeah but I dont understand where to but the index. If I put it in the rows it will become a hierarchy and I dont know how to hide that. This doesnt hide. And its a matrix not a normal table..

    • lukiz84's avatar
      lukiz84
      Memorable Member

      You don't need to put it on the matrix. PowerBI uses it internally, when sorting the "Customer Country" field.

       

      BR

      • MarlenePirker's avatar
        MarlenePirker
        Helper I

        My matrix is consiting of data from 3 different tables connected by relationships. I dont really get what table I should sort here and how this would change my matrix. I am sorry but I dont understand what you mean 🙂