Alteryx Designer Desktop Discussions

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

Combining columns if rows are blank

jberistain
7 - Meteor

I want to create a column that combines multiple columns using some if statements.

 

My goal is to end up with one [Combined] column that looks at [Revision] if it is blank or null than check [Purchase order text] is it is null or blank and if all of those are null or blank then pull in [Partner Object] value. If [Revision] has a value I want to add the Revision number.

 

IF IsNull([Revision]) OR IsEmpty([Revision]) AND IsNull([Purchase order text])

THEN [Partner object]

ELSE IF IsNull([Revision]) OR IsEmpty([Revision])

THEN [Purchase order text]

ELSE [Revision]

ENDIF

 

jberistain_0-1634242733076.png

 

3 REPLIES 3
DawnDuong
13 - Pulsar
13 - Pulsar

hi @jberistain 

From first look, it seems that there is an error in the formula.

There are 2 nested if loops, so you need to add another "Endif"

Alternatively, instead of having "ELSE IF" on the 3rd row you should use "ELSEIF". 

Dawn.

jberistain
7 - Meteor

IIF(!IsNull([Revision]) AND [Revision]!="",[Revision],
IIF(!IsNull([Purchase order text]),[Purchase order text],[Partner object]))

 

I think Solved: Re: Function similar to "Coalesce" - Alteryx Community actually worked for this.  @JohnJPS

 

jberistain
7 - Meteor

I looked up this other post and I think the correction I made using their solution worked. Thank you for taking a look and replying to my question!

Labels