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

If clause Formula-tool

Levin128
5 - Atom

Hey there, Im pretty new to ALteryx and got a quick question regarding the if-clause. The problem I have is that I get an Error message when using the following formular and I dont know why.

 

IF IsNull([First Release Year3])AND IsNull([First Release Year2]) then [First Release Year1] Else If IsNull([First Release Year3]) AND !IsNull([First Release Year2]) then [First Release Year2] Else [First Release Year3] ENDIF

 

The formula should go through each of the coloumns and if true Add the Value [FR1 or FR2 or FR3] to the new column. There probably is a much easier way to do it but I now really wanna solve it in this way.

 

Any help is appreciated! Cheers

5 REPLIES 5
ShankerV
17 - Castor

Hi @Levin128 

 

Please try the below formula.

 

IF IsNull([First Release Year3]) AND IsNull([First Release Year2])
THEN [First Release Year1]
ELSEIF IsNull([First Release Year3]) AND IsNull([First Release Year1])
THEN [First Release Year2]
ELSE [First Release Year3]
ENDIF

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Levin128 

 

Or one more easy formula also.

 

IF !IsNull([First Release Year1])
THEN [First Release Year1]
ELSEIF !IsNull([First Release Year2])
THEN [First Release Year2]
ELSE [First Release Year3]
ENDIF

 

Many thanks

Shanker V

Levin128
5 - Atom

Hi @ShankerV, thanks for the quick reply. It looks better, thanks. However I still get an Error Message although its a different one: Error: Formula (124): The field "" is not contained in the record. (Expression #2)

ShankerV
17 - Castor

Hi @Levin128 

 

Can you please share some screenshots on the error message from Results window.

 

Also configuration window of the Formula tool 124 please.

 

Many thanks

Shanker V

Levin128
5 - Atom

Hi @ShankerV,

 

I've found the Problem I had another formula-tab open with nothing inside, so it gave me the mentioned Error.

 

Thanks again for your help

Levin128

Labels
Top Solution Authors