Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to Create a Month Year Column in Calendar

Hello all, 

 

I am trying to find a formular to create a mont year column (eg: November 2019, December 2019) that can also be sorted chronoically (eg: November 2019, December 2019, Janauary 2020, February 2020) from my data calendar. 

 

I have checked out some suggestions here such as 1, 2, 3, 4 but none of them is working for me. I have also tried to find a DAX functions but it only has a month or a year function seperately. 

 

Thank you! 

  • Anonymous ,

    Why are giving column = Month Year = format([Date],"mmmm yyyy")

    you have to give only

    Month Year = format([Date],"mmmm yyyy")

    or

    Month Year = format([Date];"mmmm yyyy")

    Create a month year sort column

    Month year Sort = format([Date],"YYYYMM")

9 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you very much! It works perfectly! 

  • julioms23's avatar
    julioms23
    Frequent Visitor

    Hi send you one example new column en Calendar Table: I don't know if that it's what you need.

     

    MONTH L2 = FORMAT('Date'[Date];"mmmm") & " " & 'Date'[Year]

     

    Please confirm me.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi thank you for your help. Unfortunately, it gives me an error message like this. 

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

        Anonymous ,

        Why are giving column = Month Year = format([Date],"mmmm yyyy")

        you have to give only

        Month Year = format([Date],"mmmm yyyy")

        or

        Month Year = format([Date];"mmmm yyyy")

        Create a month year sort column

        Month year Sort = format([Date],"YYYYMM")

    • Anonymous's avatar
      Anonymous
      Not applicable

      My bad. I will check the link out. 

       

      It gives me an error. Any idea why?

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion
        Sorry, meant:

        MonthYear = MONTH([Date]) & YEAR([Date])