Forum Discussion

ilcaa72's avatar
ilcaa72
Helper IV
7 years ago
Solved

Sort by Column Date in reverse order

i would like to sort the columns in reverse order, newest date first...i have a calculated measure that relies on the Date field, so changing the Column value to a Format(Str(Date), changes my calculated measure to 0.00

 

is there a way to sort the Date field in  columns in reverse order?

 

  • i ended up going to Power Query, grouping the Dates together. adding an Index to the individual dates, then expanding the 'table' for the group and selecting the columns to bring in, every distinct date got a distinct rank starting with latest date first...

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    What does your source data look like? Is that a Matrix visual? If that data is a single column that is in the Columns area of a matrix visualization, you could use a Sort By field to reverse sort it.

    • ilcaa72's avatar
      ilcaa72
      Helper IV

       

      THANKS, i was able to create a sort order by using the RANK function in Dax. It allows my most current date to have the 1 value and using DENSE option, gives each distinct Date value a rank, starting with newest date as 1 and working backwards...

       

      NOW, i am trying to Sort my Date column by the new calculated column, BUT, i keep getting the message,  "This column cant be sorted... (see screenshot)" . i removed previous sort columns, Power Query doesnt have a sort for this column, how do i resolve. thanks

       

        

      • ilcaa72's avatar
        ilcaa72
        Helper IV

        i ended up going to Power Query, grouping the Dates together. adding an Index to the individual dates, then expanding the 'table' for the group and selecting the columns to bring in, every distinct date got a distinct rank starting with latest date first...