Using Sets in Data Analysis
Sets allow you to compare and query subsets of data defined by specific conditions. Sets can be made more dynamic and interactive with Set Actions, which enable users to interact directly with a visualization or dashboard to control their analysis. For example, selecting marks in the view can change the values within a set. Additionally, Set Control provides a filter-like interface for users to modify set membership easily.
Creating Sets
Dynamic Sets
Dynamic sets update their members based on changes in the underlying data and can only be based on a single dimension.
To create a dynamic set:
- Right-click a dimension in the Data pane and select
Create > Set
. - In the Create Set dialog box, configure your set using the following tabs:
- General: Select specific values or use the
Use all
option. - Condition: Define rules for membership based on conditions like total sales.
- Top: Set limits based on criteria like top sales performers.
- Click
OK
to add the set to the Data pane.
Fixed Sets
Fixed sets maintain their members regardless of changes in the underlying data and can be based on single or multiple dimensions.
To create a fixed set:
- Select one or more marks in the visualization.
- Right-click the marks and select
Create Set
. - In the Create Set dialog box, name your set and configure options such as including or excluding members, removing dimensions, or specifying separators for multiple dimensions.
- Click
OK
to add the set to the Data pane.
Managing Set Membership
To add or remove data points from a set:
- Select the data points in the visualization.
- Use the Sets drop-down menu in the tooltip to add or remove points from the set.
Using Sets in Visualizations
After creating a set, drag it to the visualization. You can display set members as individual items or aggregate them into In/Out categories:
- In/Out Mode: Separates set members into
In
(members) andOut
(non-members). - To enable, right-click the set in Tableau Desktop and select
Show In/Out of Set
. - Show Members: Lists all members in the set.
- Right-click the set and select
Show Members in Set
.
Enhancing User Interaction
Set Actions
Set actions allow users to update set values based on their actions within the viz. For more details, refer to the Set Actions documentation.
Set Control
Set Control lets users modify set membership using a card interface similar to parameter or filter controls. This feature is only available for dynamic sets.
To show Set Control:
- Right-click the set in the Data pane and select
Show Set
. - Customize the control via the menu in the upper right corner of the card.
Combining Sets
Combining sets enables you to compare data subsets and answer complex questions. To combine sets, they must be based on the same dimensions.
To combine two sets:
- Select the sets in the Data pane.
- Right-click and select
Create Combined Set
. - In the dialog box, name the combined set and choose how to combine the members:
All Members in Both Sets
Shared Members in Both Sets
Except Shared Members
Note: Combining sets and some features may not be available in older workbook versions using certain data sources.