Forum Discussion

dsi's avatar
dsi
Frequent Visitor
2 years ago

Sort Matrix Column Headers by dynamic in slicer context

Hello all,

 

unforgetly i'll need help with my visual. Does anybody have a solution to sort header dynamic in filter context?
I would like to sort it by the average value based on my Year/month filters.
Expected sorting : A-C-G-B-F-E-D



 

4 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    dsi 

    you cant dynamically change the sorting order of the columns base on a measure in a matrix . 

     

     

    but what you can do , is set a static order for the column you are using in the column setion for the matrix.

     

    you can sort base on your knowledge of your data .

    lets say, you know that almost always A is the highest, then you give it an index of 1 . etc...

    ( you create a sorting column in power query) 

     

     

     

    best regards 

    • dsi's avatar
      dsi
      Frequent Visitor

      I had feared that. I think it will almost being that. 

      Calculated table with Averages of each Periode and Country. Periode and Country are the filters for this view.  

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dsi 

     

    Please try this:

    I create a set of sample data:

    Then copy the column which you need to sort and click Enter Data:

    Then Transform data > Merge Queries:

    Close&Apply,

    select the column and click Sort by column, select the sort column.

    The result is as follow:

     

    Best Regards,

    Zhengdong Xu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • dsi's avatar
      dsi
      Frequent Visitor

      Hello,

      thank you for replying, but this solution was well known.