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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Custom Column in Transformation, irrational errors

Power bi has been kicking my arse all morning by telling me that statements in the Custom Column diolog in the Transformation tab are syntatixcally correct (No errors found) yet after clicking ok, telling me stupid things like Duration.Day is not recognized.

 

Computed colum:

 

if [MySkills.TargetDate] is null
then
Duration.Day(DateTime.LocalNow() - DateTime.LocalNow())

else

Duration.Day(DateTime.LocalNow() - [MySkills.TargetDate])

 

Syntax is green lighted by Power bi, but then returns "Expression.Error: The name 'Duration.Day' wasn't recognized. Make sure it's spelled correctly."

 

Error.PNG

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @Anonymous ,

 

Could it be as simple as that the function is called Duration.Days?

 

Duration.Days - PowerQuery M | Microsoft Learn

 

Let me know! 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @Anonymous ,

 

Could it be as simple as that the function is called Duration.Days?

 

Duration.Days - PowerQuery M | Microsoft Learn

 

Let me know! 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Anonymous
Not applicable

 That did get me past the error, so I will mark it as a solution.

 

This only leaves the mystery of Power Bi indicating the syntax is correct in the dialog. Now I can't trust anything it says.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors