Forum Discussion
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
- bhanu_gautam
Super User
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
- AnonymousNot 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. - bhanu_gautam
Super User
Anonymous , Create a new custom column instead of new measure,
Please accept as solution if it helps
- AnonymousNot 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.