We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Mutliple operations in the THEN statement of IF condition

Saratnarendran
7 - Meteor

Hi

I would like to write an if condition that has multiple operations to be performed once true. The conditions are as follows:

 

I have three columns A, B, and C. I need to move values within these 3 columns depending upon null/blank conditions like below:

 

If A = null and B is not equal to null, THEN

A=B

B=C

C= null

 

else if A = null and B = null and C is not equal to null, THEN

A = C

B = C = Null

 

else

[A]

 

endif

 

Can someone please advice on how to perform multiple THEN operation?

1 REPLY 1
EdwardCochrane
7 - Meteor

If you are trying to change each field, then you will need three separate formulas, one per column.

 

e.g.

Formula for A:

 

If isnull([A] and !isnull([B]) then [B] elseif isnull([A]) and isnull([B]) and !isnull([C]) then [C].

 

repeat and amend as required for the other two columns.

Labels
Top Solution Authors