In Tableau, a "set" is a custom-defined subset of data that you create based on a condition or criteria you specify. Sets allow you to group data points together for analysis, comparisons, and visualization. Unlike filters, which are used to exclude data from a view, sets are used to create explicit groups of data points within your dataset. Here's how sets work in Tableau:
Creating Sets:
To create a set in Tableau, select a dimension or measure in your worksheet.
Right-click on the selected field and choose "Create Set" from the context menu.
In the "Create Set" dialog, you can define the condition or criteria that determine which data points are included in the set.
Defining Set Conditions:
Set conditions can be based on various criteria, including values, ranges, top N values, or custom expressions. For example, you can create a set of "High Sales" by including products with sales greater than a certain threshold.
Sets can also be dynamic, which means they update automatically as data changes, or they can be static, remaining fixed regardless of data changes.
Using Sets in Visualizations:
Once you've created a set, you can use it in your visualizations like any other dimension or measure. You can drag and drop sets onto the Rows or Columns shelf to create charts and tables.
Sets can be used as filters, color codes, or to define reference lines within visualizations.
Comparing Sets:
Tableau allows you to create multiple sets and compare them within a single visualization. This is useful for analyzing intersections and differences between different subsets of data.
You can create combined sets, which represent the union or intersection of two or more sets.
Dynamic and Static Sets:
Sets can be dynamic or static. Dynamic sets automatically update as the underlying data changes. Static sets remain fixed regardless of data changes.
Set Actions:
Tableau also supports set actions, which allow users to interactively select data points in a visualization and use those selections to create or modify sets on the fly. Set actions can enhance interactivity in dashboards.
Sets in Tableau provide a powerful way to segment, categorize, and analyze data based on specific conditions or criteria. They are versatile tools that can be used for a wide range of data exploration and visualization tasks, enabling users to gain deeper insights and make more informed decisions.