If these values A1, B1, C1 and so on are equal to their counterparts A2, B2, C2 and so on, I want to output "TRUE" in the new To Be Removed column. So I have a formula that looks like this (please note I have changed the variable names to A1, A2 for simplicity).
I have no idea how to format this if statement to work the way I want it.
Solved! Go to Solution.
Hi @shaheer
Try the following expression below:
If [A1] = [A2] then "True" elseif [B1] = [B2] then "True" elseif [C1] = [C2] then "True" elseif [D1] = [D2] then "True" elseif [E1] = [E2] then "True" else "False" endif
Hope this helps, if it does please like this post and if it helps resolve your problem, mark it as a solution. If you have any other questions, please let us know.
When I try the formula, I get invalid operator error.
@shaheer Can you check the data type of the fields you are using in this formula? all should be the same data type
I just checked and it turns out A1, A2, E1, E2 are Booleans. I assumed Alteryx would count them as strings since their values say either TRUE or FALSE. How can I modify the formula?
You can use a select tool before the formula tool to convert the data types before using the columns in the expression within the formula tool.
Hope this helps.
@shaheer Boolean and Strings are different data types. you need to convert them into strings then try again with your formula. One way of changing alll in to string type is with the Multi-Field formula
Yes, completely forgot we can change the data types from there. Thank you so much!