Home Data Prep Q&A

Big News: we’ve moved to the DataRobot Community! Please keep your eye out for an email invitation to join us there. Refer to the We've Moved FAQ for a guide on how to use your existing Paxata Community account to login to our new home.

Visit the official Paxata Documentation portal for all of your doc needs.

Multiple If statements

I can spend hours trying to get the syntax correct on multiple if statements, can you help me shorten that time by giving me some advice on how to ensure I place the ()'s correctly?  Does the Prettify option help?  Doesn't see to help.
If ((isnull(@[email protected]), "Pass - Ok to be null",
      If ((@[email protected]) = "Enhanced",
        If(and(LEN(@[email protected])&lt;11,LEN(@[email protected])&gt;14,concatenate("FAIL - UPC cannot be < less than 11 or > 14 characters ", LEN(@[email protected])),"Pass - field length is good")),
concatenate("Pass - No check needed, Enriched Indicator = ",@[email protected] )), "pass - thought this would be the fall through ")))
Appreciate some guidance!


  • Can someone point me to what defines what the numbering scale means in the Compute Step dialog?  If it goes to 7, does that mean I am lacking another statement in response to the previous statements?
  • AkshayAkshay Posts: 111 admin
    Hello CFresh, 

    Could you please elaborate on the second question with some screenshots? 

    Regarding the multiple if statements- the syntax is If(Condtion,true,if(condition,true,false)) - Please do remember to close brackets of every compute function you open. In the example you have given above, it looks like you are using multiple open paranthesis after the first two if statements that never seem to be get closed. 

    I hope this helps,

  • As far as the numbering scheme, Paxata now shows a 1 2 3 4 etc next to the Compute statements that you write and I think it was an enhancement recently, I was just curious if they help with how many closing ")" are needed in the code.  As far as that particular statement, Ashok was able to help me because I do have issues getting past errors in the code and the positioning of the closing and ending "()"  but thanks
Sign In or Register to comment.