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.
SOLVED

Conditonal Statements Combined

Nuno_Meneses
7 - Meteor

Hello again,

 

I need some help with conditional statements. This format is nor supported by alteryx but I need something like this

 

IF [A] = 'EU' and ( [B] != 'PT' or [B] != 'DE' .............or [B] != 'DK')

Then 'Issue'

Else Null()

 

Endif

 

I've tried a lot of statement but I can't figure out how to do it. Thanks. 

5 REPLIES 5
binuacs
21 - Polaris

@Nuno_Meneses  Try

 

IF [A] = 'EU' and [B] Not IN (‘DE’,’DK’,….) Then ‘Issue’

Else Null()

endIf

PhilipMannering
16 - Nebula
16 - Nebula

Why isn't it supported? That should work... 

You can also use the IN() function,

image.png

Felipe_Ribeir0
16 - Nebula

Hi @Nuno_Meneses 

 

Seems to me that you can use this way to simplify the formula, and the result will be as expected:

 

IF [A] = 'EU' and [B] not in ('PT' , 'DE', ............. ,'DK')

Then 'Issue'

Else Null()

Endif

 

formula.png

PhilipMannering
16 - Nebula
16 - Nebula

I thnk you want to use AND all the way.

Because,

[Field] != 'X' or [Field] != 'Y' 

Will always evaluate to True.

Nuno_Meneses
7 - Meteor

IF [A] = 'EU' and [B] not in ('PT' , 'DE', ............. ,'DK') works perfectly thank you all

Labels
Top Solution Authors