Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Hierarchy Logic Formula

KRSANCHEZ
5 - Atom

Hello - I am attempting to write a formula that would create a new field.

 

These are the following fields: Z2, Primary Group, Customer

 

The logic would be: If Z2 is not null then Z2, If Primary Group is not null then Primary Group, If both Z2 and Primary Group are null then Customer. How could I write this formula?

 

 

2 REPLIES 2
fmvizcaino
17 - Castor
17 - Castor

Hi @KRSANCHEZ ,

 

IF isnull(Z2) and isnull([Primary Group])

Then Customer

elseif !isnull(Z2)

then Z2

elseif !isnull([Primary Group])

then [Primary Group]

else null()

endif

 

 

Best,

Fernando V.

atcodedog05
22 - Nova
22 - Nova

Hi @KRSANCHEZ 

 

You can use formula like below

 

IF !IsNull([Z2]) THEN [Z2] 
ELSEIF !IsNull([Primary Group]) THEN [Primary Group] 
ELSE [Customer] ENDIF

 

Workflow:

atcodedog05_0-1642225816518.png

 

Hope this helps : )

 

Labels