Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Matrix column header inverse order by date

Hi,   I have a matrix and I want to sort the headers of the columns by the most recent date. So every day the current day should be at the left. Here a very simple example of how it should look tod...
  • v-frfei-msft's avatar
    8 years ago

    Hi Anonymous,

     

    Based on my test, we can take the following steps to meet your requirement.

     

    1. Create a calculated column to rank the date.

    rank = RANKX(ALL(Escalation),Escalation[Created Date],,DESC)

    2. In Power query, duplicate the date column and change it to text format. Then make it sort by rank.

     

    3.Then we can get the result as we need.

     

    For more details, please check the pbix as attached.

     

    https://www.dropbox.com/s/ba66v8gvm44yr1o/matrix.pbix?dl=0

     

    Regards,

    Frank