ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Conditonal Statements Combined

Nuno_Meneses
メテオール

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件の返信5
binu_acs
ポラリス

@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
ネビュラ

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
メテオール

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

ラベル
トップのソリューション投稿者