Hi,
I often have situations where I really wish I could make a field with a data type of "set".
For example, I have a table of pets owned by each person.
The "Pets" Field would be perfect if it could be processed as a "set" type.
Person | Pets |
John | Dog, Cat |
Susan | Fish |
How to you manage these kinds of situations in Alteryx?
(I sort the pet values in alphabetical order, and concatenate the string values using the summarize tool. This is the best I could think of)
Solved! Go to Solution.
Hi @JunePark
If are looking set datatype, set as in collection.
Sorry Alteryx doesnt have a "Set" datatype.
If you tell us what action you are looking to do we can suggest you a workaround.
If you split your data to rows/columns (Text to Columns Tool) you can probably get any outcome you want from there,
Person | Pets |
John | Dog |
John | Cat |
Susan | Fish |
Or to get to this stage you can use the Summarize Tool and have two group bys (on Person and Pets) to get a unique list.
Then could get to your set list by doing a Summarize group by Person and Concatenate Pets.
Basically, if you provide a specific output you'd like to achieve you probably can do it with the Transform Tools without logical sets of the form {dog, cat}.
Hope some of this helps.
Thanks,
Philip
Thanks for the reply!
I also think this is the best workaround
Groupby of summarize would be the best workaround if you want to add things up.
Text to Column split on commas is best workaround if you want to split things back.