Let say i have this dataset
Field1 Field2 Field3
123456 A12345 AA1234
222345 AA2234
AA3234
What I want to create are new column based on the value in the specific field, like if Field1 contain value and Field2 contain value and Field3 contain value then Field1 value, then if Field2 and Field3 then Field2 value. Lastly, if Field3 then Field3 value.What is the best practice to create the workflow.
Solved! Go to Solution.
Hey @rouzu! Try to add a Formula tool. Create a new field with the following expression.:
iif(contains([Field1],"AA") && contains([Field2],"AA") && contains([Field3],"AA"),[Field1],iif(Contains([Field2], "AA") && contains([Field3],"AA"),[Field2],iif(Contains([Field3], "AA"),[Field3],null())))
You can change the "AA" to whatever value you're testing for. Hope this helps!
@rouzu make sure that all of your fields are strings first or use the tostring() formula in Alteryx. That should get rid of that error for you.
Thanks I'm manage to do it. So, It is the best practice way to represent the output or have another trick to do it
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |