Forum Discussion

Gunglewack's avatar
Gunglewack
Icon for Microsoft Employee rankMicrosoft Employee
6 years ago
Solved

January is in the wrong place

Hi How can I make January come after December in my chart? Of course, if looking at a whole calendar year, Jan does come before December, but how can I wrap Dec-19 to Jan 20 at this time of year? I...
  • v-xuding-msft's avatar
    6 years ago

    Hi Gunglewack ,

    Do you create a calendar table? If not, please create one using the formula below and then sort the "MonthName" column by the "Year & MonNum" column.

    Calendar = 
    VAR _calendar =
        CALENDAR ( "10/1/2019", "5/1/2020" )
    RETURN
        ADDCOLUMNS (
            _calendar,
            "Year & MonNum", YEAR ( [Date] ) & MONTH ( [Date] ),
            "MonthName", FORMAT ( [Date], "mmmm" )
        )
    

    Hope this can help you.

     

    Best Regards,

    Xue Ding

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.