New to Designer. My field name is [AG/UG] and contains these numeric values (3000, 3100, 7000, and 7100). Trying to write an IF THEN statement that would change the 3100 and 7100 to equal "AG" (just the letters) text string, and, to change the 3000 and 7000 to equal "UG". Your help is greatly appreciated!
Solved! Go to Solution.
Hi @J25607
Assuming your field is numeric you could do the below. If it's text then put quotes around the numbers.
IF [AG/UG] IN (3100,7100) then 'AG'
ElseIf [AG/UG] IN (3000,7000) then 'UG'
Else Null()
Endif
You'll need to create a new field, because the data type will be text
IF [my field] IN (3100, 7100) THEN "AG"
ELSEIF [my field] IN (3000, 7000) THEN "UG"
ELSE "<unknown>"
ENDIF
Chris
Luke, tried your suggestion. Still get an error.
Chris, how/where would that new field be created?
Thanks!
Thank you both!!
You're very welcome! Be sure to mark the solution(s)
Create a new field: Use the Formula tool
Suggestion for just starting to use Alteryx: at the top of this page, try Learn > Academy
Learning Paths
Interactive Lessons
Videos
Luke, sorry but this is still returning the numeric values no the AG & UG. I copied your formula as is.
@J25607 Provide a screenshot please, or your workflow.