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
billybazinga
Frequent Visitor

Cannot convert value date to type Function

Hi everyone,

 

I have a function in my code which specifies today's date, under this form: Date.Today = Date.From(DateTime.LocalNow())

 

I have a new column with the following code returning the error on the screenshot and I can't for the life of me figure out what is going on. I have tried to add Date.From in front of Date.Today but to no avail. Any ideas?

 

 

if [Date_Receipted]<>Date.NotDelivered 
or Date.Year([#"Date_Promised (calculated)"]) > Date.Year(Date.Today)
then null 
else "Week "&Text.From(Date.WeekOfYear([#"Date_Promised (calculated)"])-Date.WeekOfYear(Date.Today()))

 

billybazinga_0-1656669984270.png

 

 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Issue is due to the fact that you have use Date.Today() which should have been Date.Today

1.png

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

Issue is due to the fact that you have use Date.Today() which should have been Date.Today

1.png

Thank you very much, I obviously looked at this far too much and missed it 🙂

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.

Top Solution Authors
Top Kudoed Authors