In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Eligibility check help

Navya08
8 - Asteroid

I have this data i want to flag the ones which are not meeting this criteria:

geography type: domestic 

then cabin class should be economy/coach class or premium economy class

and if geography type is international: 

then cabin class should be business class or first class.



 

2 REPLIES 2
DavidSkaife
14 - Magnetar

Hi @Navya08 

 

This formula in a Formula tool will work:

 

IF [Geography type] = "domestic" and [Cabin class] in ('Economy/coach class','Premium economy class')
THEN 0
ELSEIF [Geography type] = "International" and [Cabin class] in ('Business Class','First class')
THEN 0
ELSE 1
ENDIF
binuacs
21 - Polaris

@Navya08 another way of writing the expression

IF ([Geography type] = "Domestic" AND NOT ([Cabin class] = "Economy/coach class" OR [Cabin class] = "Premium economy class"))
OR ([Geography type] = "International" AND NOT ([Cabin class] = "Business Class" OR [Cabin class] = "First class")) 
THEN "Invalid"
ELSE "Valid"
ENDIF

 

image.png

Labels
Top Solution Authors