Alteryx Academy
MyAlteryx
Knowledge
Help Docs
Home
Participate
Discussions
Alteryx One
Filter Tool
ashiques
Hi
When i used this Formula
IF left([Name], 7) == "A_Fract" THEN left([Name], 7) == "A_Fract" ELSE left([Name], 11) == "B_Analytics" ENDIF
I have to make check on two Words.I want only one value from Field but i got both the values of "A_Fract" and "B_Analytics". How can i get only one value.
Like first i find "A_Fract" then if its not found then find "B_Analytics". I didnt get one value.
Preparation
Accepted answers
ChadM
Hi Ashique,
Try the following:
IF left([Name], 7) == "A_Fract"
THEN "A_Fract"
ELSEIF left([Name], 11) == "B_Analytics"
THEN "A_Fract"
ELSE "No Value"
ENDIF
With the If/Then statement, you are looking for two values, if the first isn't found, make the second value part of your ELSEIF statement. Finally, if neither of the two values are found, use the ELSE to signify the alternative.
Thanks!
All comments
ChadM
Hi Ashique,
Try the following:
IF left([Name], 7) == "A_Fract"
THEN "A_Fract"
ELSEIF left([Name], 11) == "B_Analytics"
THEN "A_Fract"
ELSE "No Value"
ENDIF
With the If/Then statement, you are looking for two values, if the first isn't found, make the second value part of your ELSEIF statement. Finally, if neither of the two values are found, use the ELSE to signify the alternative.
Thanks!
Quick Links
Unanswered
Community Events
Groups
Tags
Workflow
Output
Preparation
Datasets
Input
Developer
Help
Tips and Tricks
Common Use Cases
Server
Transformation
Developer Tools
Macros
Data Investigation
Best Practices
This months top contributors
atcodedog05
19458
Qiu
15866
binu_acs
15708
MarqueeCrew
13708
apathetichell
13703