Forum Discussion

bcbuckley13's avatar
bcbuckley13
Helper III
6 years ago
Solved

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?

 

  • camargos88's avatar
    camargos88
    6 years ago

    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

  • Power Query has a "try...otherwise"  construct that you will want to use.  maybe show your (sanitized) code.

  • mahoneypat's avatar
    mahoneypat
    Microsoft 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

  • dax's avatar
    dax
    Community 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 Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

      • camargos88's avatar
        camargos88
        Community 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.