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

Alteryx Designer Desktop Discussions

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

Conditional function

BillyL14
8 - Asteroid

Could someone please advise on what is wrong with this function?

 

WL1_0-1597768226675.png

 

Thank you very much

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @BillyL14 try removing the quotes around 0. You only put quotes if the column you are testing in a text field not a numeric field.

bpatel
Alteryx Alumni (Retired)

hi @BillyL14 ,

 

you could also try this formula. removing the quotes and changing [stat.value]==[inv.value] to [inv.value]. since you are updating the column you don't want the [stat.value] ==

i hope this makes sense!

bpatel_0-1597769501109.png

 

vizAlter
12 - Quasar

@BillyL14  — You are giving a condition after the "Then" phrase which is not allowed. Please see the highlighted error in the screenshot.

 

vizAlter_0-1597770693425.png

 

Solution is here --- Assuming that "0" is a string/text in your data (not a numeric data type):

 

IF [Stat.value] = "0" THEN [Inv.value] ELSE [Stat.value] ENDIF

 

vizAlter_1-1597771176727.png

 

Labels