Combined Tableau Sets

The Combined Sets in Tableau are handy to compare two existing sets for further analysis. In this article, we will show you how to Create Combined Tableau Sets with an example.

Before we start creating combined sets in Tableau, we have to understand the properties present in Combined tableau sets.

For this Tableau combined sets example, we are going to use the Super Store sample excel file downloaded from the Tableau website. Please visit Connecting to Excel Files in Tableau article to understand, How to connect and extract data from an Excel file in Tableau.

Tableau Combined Sets Properties

The following screenshot will show you the window used to create Combined Set in Tableau, and their properties are:

  • Name: Specify a unique name for the set. The title should reflect the set functionality.
  • Sets: Please select or change the existing Set from Drop down menu. The first set act as Left Set and the second set as a Right set
  • All members in Both Sets: This option is similar to SQL Full Join. If you select this option, Tableau Combined Set holds all the members from Left Set and Right Set.
  • Shared Members in Both Sets: This option is similar to SQL Inner Join. This Combined Set option holds matching members from Left Set and Right Set. It means, Every record should match the condition present in Left Set and Right Set
  • Left Set Except Shared Members: If you select this option, Tableau Combined Set will hold all the members from Left Set except matching members from Right Set.
  • Right Set Except Shared Members: This option holds all the members from Right Set except matching members from Left Set.
Combined Tableau Sets 1

Creating Combined Tableau Sets

This example shows how to create a Combined Tableau Sets. To create Combined Sets, we need two sets. So, we are going to use the sets that we created in our previous article. Please refer to Tableau Set’s section to understand the creation of Sets.

To create Combined Tableau Sets, Please select two Sets from the Sets region, and right-click on it will open the context menu. Please select Create Combined Set… option from the context menu. In this example, we are using Random 6 States and Top 10 States By Profits, as shown below.

Combined Tableau Sets 2

Once you select Create Combined Set… option, a new window called Create Set will be opened to configure the option.

All members in Both Sets in Tableau

In this example, we are going to find the Total number of States Present in Both Random 6 and Top 10 States. To get all the records from both sets, we have to select the All members in Both Sets option

Combined Tableau Sets 3

Click OK to finish Creating our first Combined tableau Sets. Next, Please Drag the newly created set (States Present in Both Random 6 and Top 10 States) from Sets region to Row Shelf. And place it before the State filed as shown below.

Combined Tableau Sets 4

From the above listing, you can observe that the tableau report is displaying 12 records in the IN section. Because there are 16 records in both Random 6 States (6) and Top 10 States By Profits (10) sets and within that 16, there are 4 common records, so it is displaying 12 records.

Shared Members in Both Sets in Tableau

In this Tableau combined sets example, we are going to find the Total number of Common States Present in Random 6 States and Top 10 States By Profits sets. To get the Common records from both sets, we have to select the Shared Members in Both Sets option

Combined Tableau Sets 5

Click OK to finish creating a new Combined Set in Tableau. Let us replace the States Present in Both Random 6 and Top 10 States set with our newly created set, called Random States Present in Top 10 List and see the result.

Combined Tableau Sets 6

From the above listing, you can observe that California, Delaware, Georgia, and Indiana are the common fields in Random 6 States and Top 10 States By Profits sets.

Tableau combined Sets – Left Set Except Shared Members

In this Tableau combined sets example, we are going to find the total number of States which are Not Present in Right Set, Which are Top 10 States By Profits set. To get all the records from Random 6 States except the records from Top 10 States By Profits set, we have to select the Left Set Except Shared Members option

Combined Tableau Sets 7

Click OK to finish creating new Combined Sets. Let us replace the Random States Present in Top 10 List with Random 6 States not Present in Top 10 List and see the results

Combined Tableau Sets 8

From the above listing, you can observe that tableau report is displaying two records (District of Columbia and Idaho ) in the IN section. Because there are 6 records in Random 6 States, within that 6, there are 4 common records in Random 6 States and Top 10 States By Profits sets. So it is displaying 2 records.

Right Set Except Shared Members

In this Tableau combined sets example, we are going to find the total number of States which are Not Present in Left Set, Which is Random 6 States set. To get the records from the Top 10 States By Profits Tableau set, except the records from Random 6 States. We have to select the Right Set Except Shared Members option

Combined Tableau Sets 9

Click OK to finish creating a new Combined Set in Tableau. Let us replace the Random 6 States not Present in Top 10 List set with our newly created set, called Top 10 States Not present in random 6 List, and see the result.

Combined Tableau Sets 10