Forum Discussion

HenryJS's avatar
HenryJS
Post Prodigy
5 years ago
Solved

Reversing Date Axis Matrix

Hi all,

 

Is it possible to sort date axis in a matrix from newest to oldest?

 

 

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi HenryJS ,

    For my test ,  to avoid "circle", you could creata a new table using the following formula:

    Table 2 =
    SUMMARIZE (
        'Table',
        'Table'[Date],
        'Table'[Type],
        'Table'[Value],
        "index", RANKX ( ALL ( 'Table' ), 'Table'[Date],, DESC )
    )

    Then  select Date column ,sort by Index column, so that  dates in calculated table could be in descending order in Matrix 

    Here is the pbix file.

     

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.

    Best Regards,
    Eyelyn Qin

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HenryJS  you will have to create a index colum in Power query editor for the sorting to work



    sort the column based on Index number




    The expected result are as below

    Hope it resolves your issue? Please consider accepting it as the solution to help the other members find it more quickly.


    Appreciate your Kudos, Press the thumbs up button!!👍



    • HenryJS's avatar
      HenryJS
      Post Prodigy

      Anonymous the 'week ending' column I am trying to do the sort to is in a DAX table. Is it possible to do for a column like this?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi HenryJS ,

    For my test ,  to avoid "circle", you could creata a new table using the following formula:

    Table 2 =
    SUMMARIZE (
        'Table',
        'Table'[Date],
        'Table'[Type],
        'Table'[Value],
        "index", RANKX ( ALL ( 'Table' ), 'Table'[Date],, DESC )
    )

    Then  select Date column ,sort by Index column, so that  dates in calculated table could be in descending order in Matrix 

    Here is the pbix file.

     

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.

    Best Regards,
    Eyelyn Qin