Forum Discussion
Cannot convert value 'Monday' of type Text to type Number.
Hello,
I am trying to get the day name from a date but it keeps giving me the error below
Cannot convert value 'Monday' of type Text to type Number.
I am using the formula: FORMAT('Views'[Created].[Day];"DDDD")
Any help would be appreciated!
Thanks
Hi nakin,
Based on my test, you could try this formula:
Number = FORMAT('Views'[Created].[Day],"DD")Result:
You can also download the PBIX file to have a view.
Regards,
Daniel He
5 Replies
- Seward12533
Solution Sage
Just loose the .day.
FORMAT('Views'[Created];"DDDD")- nakinRegular Visitor
Hi,
I have used the formula without the .day FORMAT('Views'[Created];"DDDD")
Now I have this error:
Cannot convert value 'Thursday' of type Text to type Number.
:smileysad:
- AnonymousNot applicable
The FORMAT function takes a number (or date, because dates are just funny numbers) as its input. You can't give it the word "Monday" as its input. You have to give it an actual date.
- v-danhe-msft
Microsoft Employee
Hi nakin,
Based on my test, you could try this formula:
Number = FORMAT('Views'[Created].[Day],"DD")Result:
You can also download the PBIX file to have a view.
Regards,
Daniel He
- nakinRegular Visitor
Hi v-danhe-msft
Thanks for this, finally I used the WEEKDAY formula and it seems to work.
Thank you !