Forum Discussion
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."
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/
2 Replies
- tackytechtomMost 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/- AnonymousNot 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.