In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF Condition with AND ; OR finctions

Chauche
7 - Meteor

HI There,

 

I have first column Confidentiality Natur (Text Col) to check for value "2" OR "3" and second column Nature Confidentialite not empty then it should result OK or NO

Below is the one I am trying but get "

 

IF Contains([Confidentiality nature],"2" OR  "3") AND !IsEmpty ([Nature confidentialite]) THEN "OK" ELSE "NO" ENDIF

 

But it gives Call function error. Any help ?

2 REPLIES 2
FilipR
11 - Bolide

Use this instead:

 

IF (Contains([Confidentiality nature],"2") OR Contains([Confidentiality nature],"3")) AND !IsEmpty ([Nature confidentialite]) THEN "OK" ELSE "NO" ENDIF

 

Or this:

 

IF Regex_countmatches([Confidentiality nature],"2|3") AND !IsEmpty([Nature confidentialite]) THEN "OK" ELSE "NO" ENDIF

Chauche
7 - Meteor

Awesome, was missing on repeating col name for OR function. 

Thanks for quick help.

Labels
Top Solution Authors