By: Eric Parker
Eric Parker lives in Seattle and has been teaching Tableau and Alteryx for 5 years. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email.
Sets and Groups are two distinct ways of creating predefined subsets of data in Tableau. While they seem similar at a high level, they have some significant differences. Below is a table quickly highlighting their different qualities. Let’s dive into each in detail.
When you create a Group in Tableau, you are essentially creating a new dimension. Groups are static.
Take this geographic group as an example:
I’ve divided the contiguous United States into eight regions. These groups are static. That means that if I refresh this data a year from now and we have expanded into Alaska and Hawaii, they won’t automatically be added to one of the existing groups. They will show up under a 9th segment called “Other”. For this reason, groups are best used for one-time analyses or on dimensions that don’t change frequently.
Groups are processed as standard dimensions filters. This means that end users can interact with a Group to filter in the same way that they would interact with a dimension.
Groups have no member limit. That means you can split the states of the U.S. into 2, 5 or 10 groups. It doesn’t matter.
Sets are more nuanced than Groups. First, Sets can be dynamic.
By utilizing the Condition or Top tabs in the Create Set dialogue box, sets can be created to be dynamic.
In this case, that means that if this data set were updated in a couple months and new products were the top 10 most profitable by Profit Ratio, the new top 10 would be colored in the above chart and the old top 10 would become gray.
Sets are also binary. That means a set either meets the criteria to be “In” (top 10 by Profit Ratio) or it is “Out”.
Sets are also processed one step before Dimension filters.
Thanks to Tableau for the above image.
One way set filters are utilized is to remove Nulls from a quick filter. Take the below example:
Null has been deselected in the quick filter but is still showing up. This can be frustrating because that deselected null value may confuse end users. It would be nice to remove it entirely. The best way to do that is to create a Set which excludes the Null.
Then, that Set can be added to the Filters card to remove the Null one step before the dimension filter so the value will not appear in the quick filter.
Set Actions (making sets dynamic based on user interaction) are also a unique property of Sets. For more on that, check out this blog post, The Magic of Tableau Set Actions.