Sets are a powerful feature of Tableau. In this series of blog posts, I will go through some of the aspects of Sets, starting from the basics and ending with the combined sets functionality.
First off, what are Sets?
They are dynamic groups made of Dimensions. For example, if you have a dimension such as category, item or region you can group the members in these dimensions based on user input, condition, formula or Top/Bottom N values. You can also change these values through user interaction.
Let us go through some examples. Click here to download the dataset I have used to follow along. This data is about the spending patterns of customers, the categories and items they spend on and some details about transactions.
How to use effectively use Sets in a Tableau visual?
Drag Category on Rows and Quantity on Rows and change the view from Standard to Entire. You will get a bar such as the one below.

Now let us create our first Set on Category. Go to Category on the Data Pane and right click. Then select Create followed by Set.

A window will open, select the first 3 items, Fitness, Food and Friend Activities and then click OK at the bottom of the screen.

Now drag the newly created Category Set on to rows on a new sheet. All you will see is In and Out, which at first glance, does not make much sense. This is because Sets has two options to view.

You can either view the members that belong to the Set or both members that do and don’t i.e. In and Out of the Set. You can toggle between these two options by right-clicking the Set pill in the Rows and selecting either of the 2 options.

For now we will keep the option on Show In/Out of Set and drag Category on the rows. This allows us to view the members in both sections, the ones that belong to the Set and the ones that don’t. We had chosen Fitness, Food and Friend Activities earlier and that is what shows up in the In section. The rest are in the Out section.

Next, drag Quantity on the Columns and switch to Entire View. You will get the Quantity values for each member like this.

Now, drag the Category Set to the Colour Marks card. You will see the members coloured based on whether they belong to the In or Out section.

And now drag the Category Set on to the Filters card, click on it and select Show In/Out of Set option.

And now select the Show Set function to view the Set on the right hand side of the visual.

Select any other categories from this pane to add them to the Set. Thus, instead of hard-coding values the way you would in a Group, this helps us dynamically add members and analyse our data on the fly.


