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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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