Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Monthname not sorting in unpivot columns

Hi,
I have a matrix in power bi where I want to show from the slicer if Year is selected only year should show, if Quarter then Quarter should show on the matrix and when month is selected MonthName should show. I have created a table with unpivot columns and the monthname is not sorting. Everything else works except the sorting. Please help. Thanks Dorathy

11 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion
    Sample data would help. But you likely need a numeric month column and use Sort By column on you monthname. Otherwise it will sort alphabetically.
  • Anonymous you have to sort month name by month number, assuming you have month like Jan, Feb, Mar and month number 1, 2, 3,...

     

    Select month name column and on column tools choose sort by , see example below, it is not exactly the same column but shows where the option are to sort by

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Slicer          

      Day

      Year 

      Quarter

      MonthName

      Week

      Day

      If Monthname is selected the Matrix shows as

      Department Apr 20 Feb 20 Mar 20 Jan 20

       

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

        Anonymous add another column for sorting month-year column and sort column

         

        Month Year Sort = 
        FORMAT( Table[Date], "YYYYMM" )

         

        sort your month year column with above new column called Month Year Sort