Forum Discussion

shubhamamilkant's avatar
5 years ago
Solved

IF statement compare multiple null columns with and

Hello Everyone, I spent like 4 hrs on this and i am not sure what i am doing wrong. 

 

my mquery code is - 

 

if [Listint_id] = null and [location_id] = null and [Shipped_id] = null then xyz else abc 

 

( i tried with "= null" , "is null", "" but they are not working) I always get else as a result not xyz

 

Can someone please help me with this

  •  

    shubhamamilkant 

    Your 1st formula is correct, can you check if those three columns have nulls values as below?  You may have blanks or other values that are not qualified as nulls. You may share a screenshot of the column

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn

     

2 Replies

  •  

    shubhamamilkant 

    Your 1st formula is correct, can you check if those three columns have nulls values as below?  You may have blanks or other values that are not qualified as nulls. You may share a screenshot of the column

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn

     

    • shubhamamilkant's avatar
      shubhamamilkant
      Helper II

      Fowmy  you are correct. one of the column had blank instead of null, I am so stupid!!! 

      Thanks for the help.