Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Multifield formula - cant combine output into single column?

Baz123
8 - Asteroid

Hi,

 

I have an issue with trying to get what I think is a multifield tool working. I need to convert an IF OR statement from Excel into my workflow.

 

The example:

 

Baz123_1-1680647562067.png

 

IF [Type] = "AAA" OR "BBB" OR "CCC" THEN "Exclude"
ELSEIF [Make] > 0 THEN " Check" ELSE "No Check Required"

ENDIF

What it needs to do is output the result to a single new column called "RESULT"

 

The formula needs to look at [Type] and if it is one of the ones mentioned then list 'Exclude' otherwise ignore and move on to the [Make] column where it needs to return "Check"  if the value is greater than 0 otherwise return "No Check Required"

 

With the formula above it works for the first part and outputs to a new column with the [Type] valid - but the second part outputs to a new separate column.

 

It also state that the [Make] is not a valid number - it is as I have changed it to a float.

 

Any help on getting this to a single column output would be appreciated.

 

Thanks.

4 REPLIES 4
alexnajm
17 - Castor
17 - Castor

It looks like you need a multi-row formula t fill in the missing values for Type, and then the Formula tool should work fine after that with a small modification:

IF [Type] = "AAA" OR [Type] = "BBB" OR [Type] =  "CCC" THEN "Exclude"
ELSEIF [Make] > 0 THEN " Check" ELSE "No Check Required"

ENDIF

PangHC
12 - Quasar

if the [type] is vary and many.

 

try use filter or join to remove the first IF then union back. if not is waste lot of time in building first IF formula.

 

 

Baz123
8 - Asteroid

Thanks @PangHC  - used a filter to separate the first column, then a formula tool to apply values to new column.

 

Then another formula tool on other side of filter to apply logic, and finally a union to bring it all back into one.

 

:)

ahsanaali
11 - Bolide

@Baz123 chipping in my 2 cents...

ahsanaali_0-1680665174906.png

Labels
Top Solution Authors