Alteryx Designer Desktop Discussions

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

How do you handle 'set' data types in Alteryx?

JunePark
8 - Asteroid

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.

 

PersonPets
JohnDog, Cat
SusanFish

 

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)

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

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.

PhilipMannering
16 - Nebula
16 - Nebula

If you split your data to rows/columns (Text to Columns Tool) you can probably get any outcome you want from there,

Person

Pets

JohnDog
JohnCat
SusanFish

 

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

JunePark
8 - Asteroid

Thanks for the reply!

I also think this is the best workaround

atcodedog05
22 - Nova
22 - Nova

@JunePark 

 

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.

atcodedog05
22 - Nova
22 - Nova

Hi @JunePark 

 

Here is a handy workflow of what i was speaking above.

atcodedog05_0-1606907001820.png

Hope this helps 🙂

 

Labels