Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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.
| User | Count |
|---|---|
| 50 | |
| 37 | |
| 29 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 58 | |
| 39 | |
| 21 | |
| 20 |