Forum Discussion
Pascal_Werner
Jun 04, 2024Copper Contributor
"if" function in Power Query not working properly
Good day, I have a power query set up that is giving me the number of days between task completions during a large project. However, I am missing the time from the last completed task until "today"...
mickhence
Jun 05, 2024Copper Contributor
If the "if" function in Power Query is not working properly, ensure your syntax is correct. The basic structure is:
powerquery
Copy code
if [condition] then [result1] else [result2]
Common issues include missing "else" statements or incorrect comparisons (e.g., using "=" instead of "=="). Double-check your syntax and conditions.
powerquery
Copy code
if [condition] then [result1] else [result2]
Common issues include missing "else" statements or incorrect comparisons (e.g., using "=" instead of "=="). Double-check your syntax and conditions.
Riny_van_Eekelen
Jun 05, 2024Platinum Contributor
mickhence Sorry, but I don't know what you mean. I know how 'if' works in PQ.