In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors