I am new to Alteryx , trying to apply few formulas but not finding a solution
Q : IF Column A contains "text" Update "text" Column B
can anybody help me
Solved! Go to Solution.
Hi @Prasant ,
Is this what you are looking for:-
if contains([Column A],"Text") then "text"
else [Column B]
endif
This formula checks if 'Column A' contains the word 'text' and if true assigns column B that value.
Best,
Jagdeesh
Hi @Prasant
Your formula would go like and assign it to Column B
IF contains([Column A],"Text")
Then "Text"
Else [Column B] Endif
Hope this helps 🙂
Here is a resource which will help you get a better understanding
https://community.alteryx.com/t5/Interactive-Lessons/Diving-Into-Expressions/ta-p/98817
https://community.alteryx.com/t5/Interactive-Lessons/Writing-Conditional-Statements/ta-p/98910
Thank you, I applied same and i was expecting "text" should update in Column B but it is updating "False"
Hi @Prasant
Flow is a Boolean datatype you need to create a new column of string datatype and later change the name using a select tool.
I have to apply this multiple time
like
IF Column A Contains "Text 1" then Column B "Text 1"
IF Column A Contains "Text 2" then Column B "Text 2"
etc..
in this cases what should be the logic to apply
@Prasant , then you would need to apply conditional function. Please refer to Conditional Functions | Alteryx Help
Hope it helps.
In the formula above, what if I want else "Blank". How should I update the formula if the desired result is not found, I want it to leave the column with blank.
IF contains([Column A],"Text")
Then "Text"
Else [Column B -- I want this to be blank if the condition is not met] Endif
Below formula worked for "Blank". Let me know if anyone has any other thoughts.
if contains([Internal Vs External],"External") then "External"
else " "
endif