Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

multiple nested IF Statements

Frederick_13
5 - Atom

Hi all,

i am trying to build this: 

 

      IF (Invoice.[MID_TERM]. values[7] = 'N') THEN

             IF (Invoice.[ BUSINESS_TYPE].values[8] <> 3) THEN

                        IF (Invoice.[ PERIODIC_INVOICE_FLAG].values[18] <> 'N') THEN

                                    Invoice.[MID_TERM]. values[7] = 'Y';

                        ELSIF (abs(Invoice.[ RENTAL_DAYS].values[10]) >= longterm_limit) THEN

Invoice.[MID_TERM]. values[7] = 'Y';

                                               END IF;

                                    END IF;

                               END IF;

but I end up with an error at the end of nested IF Statements. Nothing works neither one "END IF" nor 2 or 3. Could you please help me out?

Frederick_13_0-1649484403795.png

 

  thx

 

 

 

3 REPLIES 3
Qiu
20 - Arcturus
20 - Arcturus

@Frederick_13 
IF ELSE ENDIF should all presented to close the conditional statement.
One more thing I have noticed that it seems you want to overwrite the value for Column "LONG_TIME" while you are using Boolean statement, whch results 0 or 1.

0409-Frederick_13.PNG

Frederick_13
5 - Atom

thx for your help and your remark about the Boolean. Indeed I had to change data type

Qiu
20 - Arcturus
20 - Arcturus

@Frederick_13 
Good to know it helped. 😁

Labels