Forum Discussion

mahitham's avatar
mahitham
Helper I
8 years ago
Solved

Sorting MonthName

Hi,

 

Can any one please help me on below issue.

How to sort MonthName from January  to December in Slicer.

 

 

Thanks in advance.

  • mahitham

     

    Hi,

     

    You can a calculated column to get month numbers

    Then sort the Month Name column by Month Number column

     

    Month_Number =
    SWITCH (
        [MONTH_Name],
        "August", 08,
        "December", 12,
        "July", 07,
        "November", 11,
        "October", 10,
        "September", 09,
        "April", 04,
        "February", 02,
        "January", 01,
        "March", 03,
        "May", 05,
        "June", 06
    )

     

    Check this post as well

    http://www.excelnaccess.com/custom-sorting-in-power-bi/

1 Reply

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    mahitham

     

    Hi,

     

    You can a calculated column to get month numbers

    Then sort the Month Name column by Month Number column

     

    Month_Number =
    SWITCH (
        [MONTH_Name],
        "August", 08,
        "December", 12,
        "July", 07,
        "November", 11,
        "October", 10,
        "September", 09,
        "April", 04,
        "February", 02,
        "January", 01,
        "March", 03,
        "May", 05,
        "June", 06
    )

     

    Check this post as well

    http://www.excelnaccess.com/custom-sorting-in-power-bi/