Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

Formula Tool Returning 0 or -1 instead of String Text based off Conditional If Statement

Highlighted
6 - Meteoroid

I am trying to get the ACTION_REASON_DESCRIPTION field to return Terminated, Retired, or Death, based off the conditional IF Statement Below. The Data Type is V_W String, yet the output is returned as either 0 or -1. I have tried every string data type possible and the output remains 0 or -1. I do not understand why I am getting this output rather than what I specified in my Formula Tool Expression.

 

If StatementIf StatementOutput Field and Data TypeOutput Field and Data TypeWhat is being returnedWhat is being returned

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
IF 
[Employee_Status] = 'T' THEN 'Terminated'  ELSEIF
[Employee_Status] = 'R' THEN 'Retired'  ELSEIF
[Employee_Status] = 'D' THEN 'Death'  
ELSE
Null()
ENDIF

very close!  You don't need to specify the new variable in the syntax.

 

Thanks,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
Alteryx Partner

This formula should be written to the specific field. In this particular example, the field name should be [ACTION_REASON_DESCRIPTION].

Labels