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