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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Most Valuable Professional
Most Valuable Professional

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
Most Valuable Professional
Most Valuable Professional

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.