Forum Discussion

bilalkhokar73's avatar
bilalkhokar73
Helper IV
4 years ago
Solved

Transaction date Sorting Desc to Asc In Matrix

I have Date column in Date table, I want that Latest ddate shoudl come firts and then followed by other dates Let's say today is  17June2022 then 17june, 16 juen it should come like this in Power BI...
  • speedramps's avatar
    4 years ago

    Hi bilalkhokar73

     

    Delete your index and try this method instead.

     

    In Power Query duplicate Date column and call it DateRevSort

     

    Add a new custom column

    DateRevSorter = Number.From([DateRevSort]) * -1

    then change the format to a whole number

     

    Then go into Modelling and click on the DateRevSort column, sort by DateRevSorter.

     

    Thed hide the DateRevSorter field.

     

    When you drag Date to a visual it will sort by Date

    but when you DateRevSort to a visual it will sort by reverse Date i.e. most recent first !

     

    Thanks for reaching out for help.

    I have helped you, now please help me by giving kudos.

    Remeber we are unpaid volunteers.

    Click the thumbs up and accept as solution button. 

    One question per ticket please. If you need to extend your request then please raise a new ticket.

    You will get a quicker response and each volnteer solver will get the kudos they deserve. Thank you !