Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Nested If Then Else Statement in FIlter

Inactive User
Not applicable

Is sit possible to put multiple IF conditions in Filter? 

For example my data is like below;

Name           Amount

AAA1           100

AAA2           0

BBB1           100

BBB2           0

 

and the result should be;

Name           Amount

AAA1           100

AAA2           0

BBB1           100

 

When my name starts with BBB, the value should be greater than 0. In short, 0 is not allowed for BBB only but allowed for others.

2 REPLIES 2
Claje
14 - Magnetar

Hi,

 

A quick example of a formula for this might be something like the following:

IF StartsWith(Name,'BBB') THEN Amount > 0 ELSE 1=1 ENDIF

This will check if the name starts with BBB.  If it does, it will evaluate the filter against a condition of Amount > 0.  If it does not start with BBB, then it will test the expression 1=1, which is always true.

 

I hope this helps!

Inactive User
Not applicable

Thank you. the 1=1 was a simple solution for me.

Labels