Tableau Sets: Complete Guide with Examples, Types, and Use Cases

In data analysis, one of the most important tasks is to focus on specific data and compare it with the rest of the dataset.

This is where Tableau Sets become very useful. When working with large datasets, it becomes difficult to manually filter and analyze specific groups repeatedly.

Tableau provides a powerful feature called Sets that helps analysts and developers easily create custom groups of data and perform deeper analysis.

A Tableau Set is a custom field that contains a subset of data based on certain conditions or selections. It divides the data into two categories: IN (data included in the set) and OUT (data not included in the set).

This simple concept makes sets very powerful because you can easily compare selected data with the rest of the data.

For example, if you want to analyze the top 10 customers in your business, you can create a set that includes those customers and compare their performance with that of all other customers. Unlike filters, sets allow you to perform comparisons rather than just hide or show data.

In this article, we will understand what Tableau Sets are, how they work, their types, real-time use cases, and how they are different from filters and groups.

What are Tableau Sets?

Tableau Sets are used to group and isolate data points for better analysis. They are created from dimensions and allow users to define a subset of data either manually or using conditions.

You can think of a set like a “VIP list” where only selected members are included, and the rest are excluded. This helps in analyzing patterns, trends, and comparisons more effectively.

One important feature of sets is that they are reusable. Once you create a set, you can use it in multiple worksheets, dashboards, and calculations.

Sets can also be combined with filters, parameters, and calculations to create advanced analytics. This makes them more flexible compared to simple grouping or filtering.

In Tableau, we can create sets manually by selecting values from a list, applying custom conditions, or selecting the top and bottom values of a measure.

Sets can be used for advanced filtering, highlighting data, creating groups, and performing set operations such as unions, intersections, and differences.

Difference Between Sets, Filters, and Groups

FeatureSetsFiltersGroups
PurposeCompare dataShow/hide dataCombine data
DynamicYesNoNo
ReusableYesLimitedYes
IN/OUT LogicYesNoNo

Types of Tableau Sets

There are mainly two types of Tableau Sets, and understanding them is very important.

1. Static Set (Fixed Set)

A static set is created manually by selecting specific values from the data. Once created, it cannot be changed unless you update it manually.

Example:

  • Select regions: East, West, South
  • These regions will always remain in the set

Static sets are useful when:

  • You want fixed groups
  • Data does not change frequently

2. Dynamic Set

Dynamic sets are created using conditions or rules. They automatically update when the data changes.

Example:

  • Top 10 customers by sales
  • Products with profit > 10,000

If new data comes, the set updates automatically.

Dynamic sets are useful when:

  • Data is changing frequently
  • You want automated analysis

Create Sets in Tableau

In Tableau, there are two types of sets that we will create in the examples below.

Create a Fixed Set in Tableau

In this example, I will use the Tableau Superstore data to create a fixed set for the product subcategory.

Connect the Tableau with the Superstore dataset and right-click on the Sub-category in the Data pane and select Create -> Set.

How to create Sets in Tableau

In this step, enter the name for the set and select the values you want to group. After selecting the values, click OK.

Create a Fixed Set in Tableau

Now, in the Data pane, you will see the created Sub-category set.

Create a Set in Tableau

To use this set, I created a bar chart to display sales for each subcategory. Using this set, we will compare the values it includes with the remaining values in the Sub-category dimension.

In the bar chart view, drag Sub-category to Rows and Sales to Columns. After this, add the Sub-Category set to the Color card in the Marks section.

As a result, Tableau highlights the chosen values (“In”) in one color and the rest (“Out”) in another.

Use Sets in Tableau

With this, we can differentiate the subcategories we selected in the set from the unselected ones.

Create Dynamic Sets in Tableau

In this example, we will create a dynamic filter that displays subcategories based on a criterion that requires their sales to be among the top 5.

To create the dynamic set, right-click on the Sub-category in the Data pane and select Create -> Set.

Create a Dynamic set in Tableau

In the next window, enter the name for the set, then click on the Top tab. In this tab, select By field -> Top 5 -> Sales -> OK.

Add Dynamic set in Tableau

Now, create a chart view by adding Sub-Categories to the Rows and Sales to the Columns. After this, add the created dynamic set to the Color card in the Marks section.

Now, the Tableau chart will display the top 5 sub-categories with the highest sales as In values in one color and the rest as Out values in another color.

Tableau Dynamic sets

With this, we can see the top 5 subcategories with the highest sales, along with the rest of the subcategories in the same view.

Use Parameter in Tableau Sets

In Tableau, we can also add a parameter to the dynamic sets. For example, we create a set to display the top 5 results.

Here, using the parameter, we can dynamically update the number of top results, like top 10 or top 8.

To do this, create a parameter named “Top Sub Categories” with Data type set to Integer and Current value set to 10, then click OK.

Use parameter in Tableau Filters

To use the parameter in the dynamic set, right-click on the set in the Data pane and select Edit Set.

Edit a set in Tableau

In the edit window, replace the Top value with the Parameter we created, then click OK.

Create a Dynamic set in Tableau Chart

Now, click on the Parameter in the Data pane and select Show Parameter.

Update dynamic set in Tableau

With this, we can dynamically update the “IN” values and display them on the chart. For example, if we set the parameter to 6, it will show the top 6 subcategories with the highest sales as “IN” values.

Apply filters in Tableau Sets

With this, we can add more functionality to a dynamic set in Tableau by combining it with a parameter.

Create Combined Sets in Tableau

In Tableau, we often want to compare two different sets or groups. For example, we have a set that shows the Top-10 customers by sales and another set that shows customers from the Central region.

By combining these two sets, we can view and compare the top 10 customers from the Central region.

Set-1:

In this set, we will show the top-10 customers by sales. To create a set, click the Customer Name in the Data pane, then select Create -> Set.

Click on the Top tab and select By Field -> Top 10 -> Sales, and click OK.

Create a Combined set in Tableau

Set-2:

In this set, we will display the customers with a Profit of more than 2500. To create this set, right-click on the Customer Name in the Data pane and select Create -> Set.

Enter the Name for the set, then click on the Condition tab. In the condition, select By Field and select the condition “Profit(Sum) > 2500” and click OK.

Use Combined Sets in Tableau Chart

Using this set, we can display the customers with a profit higher than 2500.

To combine both sets, press the “Ctrl” key and select both sets in the Data pane. Then right-click on one set and select Create Combined Set.

Combine Two Sets in Tableau

Now, enter the name for the combined set, then select the criteria to display records from the options below.

  • All members(values) from both sets.
  • Shared members in both sets.
  • All values from set 1 except those that are shared with set 2.
  • All values from set 2 except those that are shared with set 1.
Create Dynamic combined set in Tableau

Here, I have selected the option Shared members in both sets, to show the customers who have made a profit of more than 2500 and are in the top 10 sales.

For the chart view, add the Customer’s Name to Rows and Sales to Columns.

Create Dynamic sets in Tableau chart

Now, drag the combined set to the Filters section. This will display the top 10 customers who have also achieved a profit of more than $2,500.

Filters records using combined sets in Tableau

This way, we can create a combined set in Tableau and use the filtered and sorted values from two sets in a Tableau chart.

Frequently Asked Questions

Q1: What is a Set in Tableau?

A set is a subset of data created based on conditions or selections.

Q2: What is IN and OUT in sets?

IN = data inside the set
OUT = data outside the set

Q3: What is the difference between a set and a filter?

Filter hides data, set compares data.

Q4: Can sets be dynamic?

Yes, dynamic sets update automatically.

Conclusion

In this Tableau tutorial, we learned about sets, how to create them, and how to use them to compare groups of data with the rest of the dataset. Unlike filters, sets allow us to separate values into “In” and “Out” groups for easy comparison.

Tableau Sets are one of the most powerful features in Tableau that help in advanced data analysis. They allow you to create custom groups, compare data, and build interactive dashboards.

By using sets effectively, you can gain deeper insights and improve decision-making. Whether you are a beginner or an experienced developer, understanding Tableau Sets is very important for building professional dashboards and reports.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.