Forum Discussion

HenryJS's avatar
HenryJS
Post Prodigy
5 years ago
Solved

Matrix Month Column Wrong Order

Hi all,

 

I have placed the month name column (below) in a matrix however it does not order correctly.

 

 Month = MONTH([Date])

 

Month Name = SWITCH('Calendar'[Month],1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November",12,"December")

 

How can I order the Month Name from January to December?

 

  • in the data view click on the month name column and thenunder the column tools tab click the sort bycolumn tab to sort by the month number column 

7 Replies

  • camargos88's avatar
    camargos88
    Community Champion

    HenryJS ,

     

    You can create a column on the date table like:

    YearMonth = FORMAT(TABLE[DATE], "YYYYMM")

     

    MonthName = FORMAT(TABLE[DATE], "MMMM")

     

    and sort the MonthName by YearMonth

    • borensm's avatar
      borensm
      Regular Visitor

      I followed you until the last step.  How do I sort MonthName by YearMonth in a matrix table?

       

      • jbirco's avatar
        jbirco
        Resolver I

        once you do the sort in the table view it will work in all visuals including the matrix, BTW you can sort it by a column that has just the month number it dosn't have to be a yearmonth column

         

  • in the data view click on the month name column and thenunder the column tools tab click the sort bycolumn tab to sort by the month number column 

  • borensm's avatar
    borensm
    Regular Visitor

    Actually, I figured out how but I'm getting this error message:  

     

    • jbirco's avatar
      jbirco
      Resolver I

      it should be just the month number not the monthyear