Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

sorting month in dropdown

Hi all, I have filter with month.
But months is not sorting correctly

 

it's sort by alphabet, how can I sort by month?

4 Replies

  • judspud's avatar
    judspud
    Solution Supplier

    Hi Anonymous,

     

    You need to sort the month name by the month number.

     

    Go to your calendar table if you have one and change the sort order of the month name to sort by month number.

     

    Thanks,

     

    George

    • Anonymous's avatar
      Anonymous
      Not applicable

      I don't have calendar table

      • judspud's avatar
        judspud
        Solution Supplier

        Hi Anonymous ,

         

        Is it possible to create a column in your existing table which identifies the month number?

         

        You can use month(datefield) to extract the month number from a date field.

         

        If possible, could you share a image on the data table or a list of the columns you have?

         

        Thanks,

        George

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous 

    You could create a month number column in Edit queries or create a new calendar with month number column, then select the "month name" column and click Modeling->sort by-> "month number" column.

    Please refer to the following:

    https://community.powerbi.com/t5/Desktop/Sorting-Slicer-to-Month/td-p/294383

    https://community.powerbi.com/t5/Desktop/Sorting-the-Slicer/td-p/24565

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.