Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Matrix Visual Multi-Layer Hierarchy Sorting

I have created a matrix visual w/ row hierarchy (4 layers) using a separate sort table w/ sort index.  All data, hierarchy, expand and collapse are spot on except the multi-layer sort is a default al...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI Anonymous,

    It sounds like you want to achieve multiple column sorting order on your matrix visual with hierarchy structure, right?

    If that is the case, I'd like to suggest you extract all the row category fields to a new table and add a custom ranking field based on these fields' values.

    Then you can add a column on the new table to concatenate all fields values, and you can set the ranking field as the 'sorting by column' of the concatenated field.

    After these steps, you can add the concatenated field to the original table, setting it as the relationship key field link to the new table, and replace the old matrix row category fields. These fields should keep the sorting order as you defended on the new table.

    Reference links:

    Custom Sorting in Power BI 

    Sorting by multiple columns 

    Relationship in Power BI with Multiple Columns - RADACAD

    Regards,

    Xiaoxin Sheng