cancel
Showing results for 
Search instead for 
Did you mean: 
Announcement | Looking to grow your skills and business impact? Join us in Anaheim June 4-7 for Inspire 2018! Sign up by year-end for BIG DISCOUNTS. Register now.

Tool Mastery | Make Group

Aurora
Aurora

 

Make Group.png This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Make Group Tool on our way to mastering the Alteryx Designer:

 

Did you ever play that party-game called 6-degrees of separation where you have to figure out how you are connected to someone famous in less than 6 relationships  (or the movie version – 6 degrees of Kevin Bacon)?

 

6 Degrees of Kevin Bacon.png

                                                           All paths lead to... Kevin Bacon

 

Well that game just got a whole lot easier with the Make Group Tool!

 

The Make Group Tool’s job is to link together data into clusters where there is a link between them in data formatted as a table.

 

For example:

 

Bone

Connected To

Head bone

Neck bone

Neck bone

Shoulder bone

Shoulder bone

Arm bone

 

Using the Make Group ool, we can now prove (with just 1 tool) that all these bones are connected to the Head bone! 

  

Bone

Connected To

Head bone

Neck bone

Head bone

Shoulder bone

Head bone

Arm bone

 

So – how is this useful in a practical case?

 

  • Discrete IDs in a data-set, grouped into ranges (attached in the v10.0 workflow, MakeGroups.yxmd)

So you’re given as set of IDs - primary keys in a database table, and you need to bring these into your Alteryx canvas. However, there are several hundred thousand IDs, and running these as individual queries will take forever.   Rather than run one query for each ID, you want to group these into continuous blocks!

 

1.png

 

We use a Formula Tool to add a column which is the number immediately after the one provided. We then use the Make Group Tool to find the groupings; and the Summarize Tool to find the largest grouping - which then gives you a substantially smaller number of queries (with a ‘from’ and ‘to’ value on each query).

 

  • Social Networking

Imagine you’re in charge of the social event in your company – and you’re trying to figure out if you’ve got disparate islands of people in the company who don’t know each other, or if everyone is connected to each other in some way.

 

Group 1.jpg                     OR                      Group 2.jpg 

 

One way to find out is to make a list of who knows who, and then let the Make Group Tool sort out the connectedness question:

 

2.png

You can use the Make Group Tool for a range of other different applications – looking for connectedness in any graph (“graph” being used in the Computer Science sense of a set of points which are connected); assisting to find more fuzzy matches; or checking if there’s a connection between different types of products in various shopping baskets form an online retailer.

 

The common factor is where you have a from;to column pair, and are trying to find the grouping – the Make Group Tool is for you! 

 

By now, you should have expert-level proficiency with the Make Group Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

 

Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

Comments
Alteryx Certified Partner
Alteryx Certified Partner

The Make Group tool is my favorite Alteryx tool!  I am in awe of the simplicity of it and aware of the power behind it.  I've used it to group fuzzy match results where match sets are used to group business or personal names together.  Also I've used it to understand ID merges.  Imagine that you open an account and get assigned an ID and that over time you create multiple IDs.  If later you find that these IDs should be merged it is simple enough to make ID 1001 merge with ID 9999.  What if there were 2,3 or 4 other IDs mixed in?

 

ID

Old ID

1001

9999

1010

7777

7777

8888

1001

1010

8888

8989

 

How would your workflow handle the conversions if IDs that were the surviving values were also OLD values?  If you are a SQL expert, try writing a query that will resolve this (remember, you don't know how many times to iterate when you start).

 

The Make Group tool "instantly" gets you to this result:

 

Group

Key

1001

1001

1001

1010

1001

7777

1001

8888

1001

9999

 

Best tool ever Smiley Happy