Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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."
Solved! Go to Solution.
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! | |
| #proudtobeasuperuser | |
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! | |
| #proudtobeasuperuser | |
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.