In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Combining Fields

Robert31395
7 - Meteor

I need to combine multiple fields in the following way. I have attached a sample input file.

 

There are 4 fields that I will call field1, field2, field3, field4. Each field has multiple records that can contain 1 of 3 values: "Exempt", "Taxable" or blank.

 

I would like to create a resultant field called "Result" that contains the following:

(I created a field called desired result that contains what I would like the "Result" field to contain)

 

"Exempt" if all 4 fields contain either "Exempt" or are blank

"Taxable" if all 4 fields contain either "Taxable" or are blank

"Mixed" if at least 1 of the 4 fields contains "Exempt" and at least 1 of the 4 fields contains "Taxable"

 

I know that I could do this with nested if then statements or filters, but I am sure there is an easier way.

 

Thank You

 

1 REPLY 1
T_Willins
14 - Magnetar
14 - Magnetar

Hi @Robert31395,

 

I think the simplest method is a IF/ELSEIF formula.  Attached is a workflow using your data.  If your data is limited to just the four columns, a single formula tool will work.  If it is considerably more or a dynamic/unknown number of columns, then the second option will do the job.

 

If this solves your question, please mark this as an accepted solution to inform the community it has been solved.

Labels
Top Solution Authors