Alteryx Designer Discussions

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

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
16 - Nebula
16 - Nebula

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
21 - Polaris

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