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

Adding Additional Column from Formula

chughes49
8 - Asteroid

I currently have this

Fac NameMonthActMonthVar
Main2345412
Elk23542312
ein 213123
emc412142

 

I am trying have this though:

where there is a new column (Entity)

and if fac name=main Philly

and if facname=elk than it gives Mont

 

I am stuck right here:

IF([Fac name] IN(Main) THEN 'Philly')

 

Thanks!!

EntityFac NameMonthActMonthVar
PhillyMain2345412
PhillyElk23542312
Montein213123
Montemc412142

 

4 REPLIES 4
DataKyle
8 - Asteroid

So you need something like this?

 

IF([Fac Name] = 'Main') THEN 'Philly'

ELSEIF([Fac Name] = 'Elk') THEN 'Mont'

ELSE NULL ENDIF

 

You can also add other options before the last else if needed.

bpatel
Alteryx Alumni (Retired)

try this

 

if [Fac Name] = "Main" OR [Fac Name] = "Elk" then "Philly" else "Mont" endif

 

hope this helps.

 

chughes49
8 - Asteroid

Is it possible to return an empty value instead of null?

bpatel
Alteryx Alumni (Retired)

Yes instead of writing null in the formula just add "" (empty quotation marks).

Labels
Top Solution Authors