Forum Discussion

Alisea_MI's avatar
Alisea_MI
Icon for Resolver II rankResolver II
4 years ago
Solved

Sort a dynamic text column (Month Year)

Hi!

I have a dynamic text column containing Month + Year (6 previous moths data).
The column is current being sorted as text by month name.
  
How can I sort it by Year - Month? I have no other date column to sort it by.

 

Many thanks in advance!

 

 

 

  • Alisea_MI 

     

    Step 1

    Create a duplicate column

     

    Step 2

    Replace Mars with Mar, Februari with Feb so on

     

    Now you get a date column with Step 2, now sort on this

     

    Regards,

    Ritesh

4 Replies

    • Alisea_MI's avatar
      Alisea_MI
      Icon for Resolver II rankResolver II

      Hi, ribisht17 ! Thanks for you idea! Unfortunately I could change it to a date - the months are in Swedish and it didn't work.

  • Arul's avatar
    Arul
    Icon for Super User rankSuper User

    Alisea_MI ,

    try to create one calculated column using beolw dax,

    Monthyear sort = FORMAT(financials[Date],"YYYYMM")

    and then sort the above column by using sortby column option.

    Thanks,

    Arul

  • Alisea_MI 

     

    Step 1

    Create a duplicate column

     

    Step 2

    Replace Mars with Mar, Februari with Feb so on

     

    Now you get a date column with Step 2, now sort on this

     

    Regards,

    Ritesh