Forum Discussion
Error when no Completion date
Hello,
I've created two columns. One is a Custom column that just adds 30 days to the Reg Date (Due Date). The "Completed in 30?" column is a Conditional column to see if the user completed the course within the 30 days.
If the Completion date is empy, I get a Null, and then an Error in the last column.
Is there any way that I can fix this?
Hi bcbuckley13 ,
You have to start the if with nulls.
The if should be something like if [Course Complete Data] = null then ........
write the other conditions with if else / else.
8 Replies
- lbendlinSuper User
Power Query has a "try...otherwise" construct that you will want to use. maybe show your (sanitized) code.
- bcbuckley13Helper III
Here's what I had, but still not working.
- mahoneypatMicrosoft Employee
From the image, your Due Date is still an Any data type. Change it to Date to see if that fixes issue.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- bcbuckley13Helper III
Thanks, but that didn't work.
- daxCommunity Support
Hi bcbuckley13 ,
If possible, could you please inform me the detailed error information? if it is caused by the data type, you could try to see whether next step is "change type", then delete this step to see whether it work or not. By the way, if possible, could you please inform me your expression of "Completed in 30" , then I will try to test this in my environment?
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- bcbuckley13Helper III
Here's the error that it gives.
- camargos88Community Champion
Hi bcbuckley13 ,
You have to start the if with nulls.
The if should be something like if [Course Complete Data] = null then ........
write the other conditions with if else / else.