Forum Discussion

jsangerman's avatar
jsangerman
Helper II
2 years ago
Solved

Dynamic sorting for matrix column headers

I have a table of project milestones that looks something like this:   Program Project Milestone Finish Program 1 Project A Milestone 3 4/1/2020 Program 1 Project A Milestone 2 5/...
  • danextian's avatar
    2 years ago

    Hi jsangerman ,

     

    Columns cannot be custom sorted by using a measure - a physical column, calculated or created in PQ is necessary. Also, a unique item in a column cannot be sorted more than once  (eg Milestone 1 is either in the first or second order but not both).  As a workaround, you can create another column that references the original and append an invisible string to it. The count of which depends on the rank of the column value you were going to initially use for sorting. Please see attached sample pbix.