Hello,
I want to extract all the data from within IF(G2<10,H2,IF(E2<F2,H2,C2)) so as two columns are created from the two closed brackets. One would give 'G2<10,H2,IF(E2<F2,H2,C2)' and the next would give IF(E2<F2,H2,C2).
How can I perform the same?
(Edited for more simplicity)
Hi @maygoyal ,
I interpret your Excel formula as the below Truth Table.
G2<10 | E2<F2 | Column1 | Column2 |
TRUE | TRUE | H2 | H2 |
TRUE | FALSE | H2 | C2 |
FALSE | TRUE | H2 | H2 |
FALSE | FALSE | C2 | C2 |
Unlike Excel, Alteryx deals with the data for each row, not for specific cells.
So I prepared the input data as below, so that all the pattens in the truth table are covered.
Expressions in Formula tool
Column1 = IF [G] < 10 THEN [H] ELSEIF [E] <[F] THEN [H] ELSE [C] ENDIF
Column2 = IF [E] < [F] THEN [H] ELSE [C] ENDIF
Output
I hope this helps. Good luck.
Hi, @maygoyal
It's best if you provide a sample 😎
Kindly see the below - I hope you find it helpful. Cheers.
1st Column given by
IF G <10 THEN H
ELSEIF E <F THEN H
ELSE C
ENDIF
2nd Column given by
IF E <F THEN H
ELSE C
ENDIF
From the logic, it seems that 1st is always equivalent to 2nd.
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |