Forum Discussion

Olia's avatar
Olia
Icon for Advocate II rankAdvocate II
8 years ago
Solved

Month column be recognized as a Month

Hi everyone,

 

I have a problem. I have a Month column in my data, which I'd like to assign a Date properties to, so that I can use it in calculated measures. So I 1st changed the data type to Date, and then to Month.... and then I get this :(

 

 

 what is this even...

  • the Date data type requires information on year, month and day, in M you can add a new column with the following syntax:

    #date([FISCAL_YEAR],[Month],1)

    that will create date field based on your year & month assigned for the first day of the month

2 Replies

  • Stachu's avatar
    Stachu
    Icon for Community Champion rankCommunity Champion

    the Date data type requires information on year, month and day, in M you can add a new column with the following syntax:

    #date([FISCAL_YEAR],[Month],1)

    that will create date field based on your year & month assigned for the first day of the month

    • Olia's avatar
      Olia
      Icon for Advocate II rankAdvocate II

      Thank you Stachu, that seems to have done the trick!