Alteryx Designer Desktop Discussions

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

Create a custom field with data based on another field

kzaveri19
6 - Meteoroid

Hello friends, 


I am new to Alteryx! Its an awesome tool and I really love working with it. 

 

I am trying to create a custom text field based on data from a native text field from an Excel data source. For example, the name of the custom column is "NewStatus" which is based on text from another column (lets say "Comment"). I would use a search on the text in Comments to get Status (similar to using LIKE in SQL). 

 

What tool do I use how do I build the expression? 

 

Thank you for your help!

 

 

3 REPLIES 3
nick_ceneviva
11 - Bolide

You would use the formula tool to do this.  Once you bring on the tool, you can either create a new column (will need to name it) or update an existing column.  Your formula will most likely be a case statement that utilizes the Contains function.

 

Alternatively, if there is a consistent pattern/location of where the status is, you could also use the RegEx tool to parse out the status.

kzaveri19
6 - Meteoroid

Could you please write some example syntax for this expression? 

nick_ceneviva
11 - Bolide

IF Contains([Comment],"On Time") THEN "On Time"

ELSEIF Contains([Comment],"Late") THEN "Late"

.....

ELSE "N/A"

ENDIF

 

Hope that helps!

Labels