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

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
binu_acs
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