Forum Discussion

bhalicki's avatar
bhalicki
Icon for Helper V rankHelper V
1 year ago
Solved

Sort matrix by all columns (not just total column)

Hi all,

I have matrix visualisation and would like to sort by the individual columns.  It seems that the matrix visualisation only allows sorting by the Total and not the individual columns.  I want to be able to select columns 2020, 2021, 2022 etc and have these sort the data in the matrix.

 

Adding the columns as measures achieves what I want, but is not practical in this example as the dataset I want to display would require over 30 measures to be created.  Also defeats the purpose of the matrix somewhat.


Kind regards,

Ben.

  • Hi bhalicki 

    Rows in a matrix visual are sorted either by the row category or by the values in the total column—not by the individual values of the columns placed in the column field well. If you want the sorting to follow a specific column value, you'll need to return that value in the total row. However, doing so will affect the actual value displayed in the total column.

     

    Please see the attached sample pbix.

3 Replies

  • Hi bhalicki 

    Rows in a matrix visual are sorted either by the row category or by the values in the total column—not by the individual values of the columns placed in the column field well. If you want the sorting to follow a specific column value, you'll need to return that value in the total row. However, doing so will affect the actual value displayed in the total column.

     

    Please see the attached sample pbix.

    • v-aatheeque's avatar
      v-aatheeque
      Icon for Community Support rankCommunity Support

      Hi bhalicki 

      If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.

      If you have any further questions, feel free to reach out.
      Thank you for being a valued member of the Microsoft Fabric Community Forum!

       

      • bhalicki's avatar
        bhalicki
        Icon for Helper V rankHelper V

        Sorry danextian , I had a few open issues and missed providing feedback for this one.  Thanks for your help.

        For anyone else who comes across this post, it seems there are two sorting behaviours implemented for the matrix visual:

        - When a single, categorical value is used for the 'columns' (for example, a year or month), then we can only sort by the total column
        - When multiple data points are used for the 'column' (for example, if we have a table with separate columns for each year, and we load each of these columns separately into the matrix visual), then we can sort on the columns individually.  This isn't always practical though, especially when we have many columns, or the data must be dynamic.

        Hopefully Microsoft can implement this feature.

        Kind regards,

        Ben.