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
Alteryx

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
Alteryx

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

Labels