Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nakin
Regular Visitor

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

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @nakin,

Based on my test, you could try this formula:

Number = FORMAT('Views'[Created].[Day],"DD")

Result:

1.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/hrbr3str316wtn6/Cannot%20convert%20value%20%27Monday%27%20of%20type%20Text...

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-danhe-msft
Employee
Employee

Hi @nakin,

Based on my test, you could try this formula:

Number = FORMAT('Views'[Created].[Day],"DD")

Result:

1.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/hrbr3str316wtn6/Cannot%20convert%20value%20%27Monday%27%20of%20type%20Text...

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-danhe-msft

 

Thanks for this, finally I used the WEEKDAY formula and it seems to work.

 

Thank you !

Seward12533
Solution Sage
Solution Sage

Just loose the .day.

FORMAT('Views'[Created];"DDDD")

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.

 

Smiley Sad

 

KHorseman
Community Champion
Community Champion

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.