Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

DAX Convert Date to Month Error

Hello.

I have a date field which I converted from Text to Date or Date/Time.

The DAX formula is: Completion Month = FORMAT ('Table'[CompletionDate/Time],"YYYY MMM")

where CompletionDate/Time format looks like this: 1/8/2024 1:25:32 PM

and I would like Completion Month to look like this: January 2024

However, I got an error: "Cannot convert value " of type Text to type Date"

What am I doing wrong?
Thank you.

  • Anonymous , Create a new custom column instead of new measure,

     

    Please accept as solution if it helps

4 Replies

  • Anonymous ,  please check datatype of exisiting column it must be selected as text select it as date format from drop down in data type than use this formula

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello, CompletionDate/Time is in Date format (not Text), but still the Completion Month DAX gives the error "Cannot convert value " of type Text to type Date"  :(.
    Thanks.

  • Anonymous , Create a new custom column instead of new measure,

     

    Please accept as solution if it helps

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, I had created a column, not a measure; anyway, I deleted that column and re-created it, and now it works. Thank you.