Alteryx Designer Desktop Discussions

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

IF contains two OR criterion and the [Specialty] column doesn't contain any one spec

snadeau456
8 - Asteroid

If Contains([Role], "PCP") OR contains ([Role], "BOTH") AND doesn't contain any of these specialties then add comment of 'Role Mismatch'

"General Practice"
"Family Practice"
"Geriatric Medicine/Family Prac"
"Internal Medicine"
"Geriatric Medicine/Internal Me"
"Adolescent Medicine"
"Pediatrics"
"Pediatric Internal Medicine"
"Obstetrics & Gynecology – CA P"
"General Practice - Dental"
"Nurse Practitioner (Adult)"
"Nurse Practitioner (Family Pra"
"Nurse Practitioner (Geriatric)"
"Nurse Practitioner (Pediatric)"
"Physician Assistant (Pediatric"
"Nurse Practitioner (OB GYN)"

 

 

 

thank you in advance.

7 REPLIES 7
danilang
19 - Altair
19 - Altair

hi @snadeau456 

 

If (Contains([Role], "PCP") OR contains([Role], "BOTH")) AND [Specialty] Not In (
"General Practice",
"Family Practice",
"Geriatric Medicine/Family Prac",
"Internal Medicine",
"Geriatric Medicine/Internal Me",
"Adolescent Medicine",
"Pediatrics",
"Pediatric Internal Medicine",
"Obstetrics & Gynecology – CA P",
"General Practice - Dental",
"Nurse Practitioner (Adult)",
"Nurse Practitioner (Family Pra",
"Nurse Practitioner (Geriatric)",
"Nurse Practitioner (Pediatric)",
"Physician Assistant (Pediatric",
"Nurse Practitioner (OB GYN)") Then  
   "Role Mismatch"
else
  ""
Endif

 

Dan

snadeau456
8 - Asteroid

Hi, it's  reading nurse practitioner or physician assistant as a mismatch, not sure why?

snadeau456
8 - Asteroid

I see, need to use a wild card.

snadeau456
8 - Asteroid

Awesome, this worked!! Thank you again.

snadeau456
8 - Asteroid

Any suggestions as two why this is not working?

 

IF (contains([PT Code], "DLA") OR
(contains ([PT Code], "DAC") OR
(contains ([PT Code],"LPC") OR
(contains([PT Code],"MT") OR
(contains ([PT Code], "SW"))
AND (contains([Degree],"BA" or (contains([Degree], "AA"))
Then "Ineligible Provider Type"
Else ""
EndIF

snadeau456
8 - Asteroid

added a ) after BA" - still doesn't work

IF (contains([PT Code], "DLA") OR

(contains ([PT Code], "DAC") OR

(contains ([PT Code],"LPC") OR

(contains([PT Code],"MT") OR

(contains ([PT Code], "SW"))

AND (contains([Degree], "BA") or (contains([Degree], "AA"))

Then "Ineligible Provider Type"

Else ""

EndIF

snadeau456
8 - Asteroid

Got it - removed ( before contains

 

IF (contains([PT Code], "DLA") OR

contains ([PT Code], "DAC") OR

contains ([PT Code],"LPC") OR

contains([PT Code],"MT") OR

contains ([PT Code], "SW"))

AND (contains([Degree], "BA") or contains([Degree], "AA"))

Then "Ineligible Provider Type"

Else ""

EndIF

Labels