Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

IF Formula with Multiple Targets

katherinetdavita
8 - Asteroid

I'm trying to create a formula for a set of demographic information to capture which people live and/or work in a set of specified counties and I've tried multiple variations of IF formulas with no success.

 

Here's some sample data. I'm trying to populate a new column called "Live/Work in Selected County" based on the work and home county fields. The four selected counties are Dutchess, Putnam, Rockland, and Westchester.

 

katherinetdavita_0-1613070072411.png

 

Looking for help with the syntax in the formula tool.

 

2 REPLIES 2
markcurry
12 - Quasar

Hi @katherinetdavita  , I think the following formula should work for you...

 

IF [Work County] IN ("Dutchess","Putnam","Rockland","Westchester") AND [Home County] IN ("Dutchess","Putnam","Rockland","Westchester") THEN 
	"Live & Work"
ELSEIF [Work County] IN ("Dutchess","Putnam","Rockland","Westchester") THEN 
	"Work"
ELSEIF [Home County] IN ("Dutchess","Putnam","Rockland","Westchester") THEN 
	"Live"
ELSE
	Null()
ENDIF
katherinetdavita
8 - Asteroid

Ah, that's amazing!! Thanks so much.

Labels
Top Solution Authors