We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multiple conditional functions if null

kmg_16
5 - Atom

Hi,

 

I have four columns each with bits of data in e.g.

store_ididstore_numberid_numberfinal_id
a    
 bb  
   c 

 

I would like to create a 'final_id' field where I essentially want to say:

 

if [store_id] is null, use [id], if [id] is null use [id_number]

([id] and [store_number] are both populated with the same figures so would only need to use one)

 

Is this possible?

TIA

2 REPLIES 2
binuacs
21 - Polaris

@kmg_16 one way of doing this with the help of Transpose tool and Multi-Formula

 

binuacs_0-1649692996142.png

 

danilang
19 - Altair
19 - Altair

Hi @kmg_16 

 

If you columns don't change, you can use a single formula tool with this expression in it 

if !isnull([store_id]) then
	[store_id]
elseif !isnull([id]) then
	[id]
else
	[id_number]
Endif

You essentially take the first non-null value.

 

Dan

Labels
Top Solution Authors