Tableau – Sets
What are Tableau Sets?
A Tableau Set is a custom field that holds a subset of data based on a given condition. In real-time, you can select members from the list or a visualization to create a set. The same can also be achieved by writing custom conditions or selecting the top or bottom few records in a measure.
How to Create Tableau Sets?
Dynamic Sets
Dynamic sets contain members that change when the underlying data changes. There can only be one dimension in dynamic sets.
To create a dynamic set
Step 1.Under Dimensions, navigate to the Data pane, right-click a field, and select Create > Set.
Step 2.Configure your set using the Create Set dialogue box. The following tabs are available for configuring your set;In the General tab, you can select one or more values that will be considered when computing the set.
A. Alternatively, you may choose the Use all option to always take into account all members, regardless of whether new members are added or removed.
![]()
![]()
![]()
b. Using the Condition tab, you can define rules that determine which members should be included in the set. As an example, you might define a condition based on total sales that includes only products with sales over $100,000.
![]()
Note: The set conditions work in the same way as the filter conditions.
c. Set limits on what members are included in the set using the Top tab. It is possible, for example, to specify a limit based on total sales that includes only the top five products.
![]()
Note : Limits set by Set are the same as limits set by Filter.
Step 3. When finished, click OK.
The new set is added to the Sets section at the bottom of the Data pane. A set icon (two intersecting bubbles) indicates that the field is set.
![]()
Fixed Sets
Fixed sets do not change their members. There are two types of fixed sets: those based on a single dimension and those based on multiple dimensions.
To create a fixed set;
Step 1.Select one or more marks (or headers) in the visualisation.
Step 2. Create a set by right-clicking the marks.
![]()
![]()
![]()
Here in the above screen shots we prepared a virtualization.
Step 1.Name the set in the Create Set dialogue box.
Step 2.The following options are available:
- As a default, the set includes the members listed in the dialogue box. Alternatively, you may choose to exclude these members. All members you did not select will be included in the set when you exclude.
- You can remove any dimensions that you do not wish to be considered by clicking the red x icon that appears when you hover over a column heading.
- You can remove specific rows from the set by clicking the red x icon that appears when you hover over them.
- Each member of the set will be a combination of the dimensions you selected. The character that separates the dimension values can be specified. Enter a character of your choice for Separate members by.
- Once the set is created, select Add to Filters shelf to automatically move it there.
![]()
![]()
Step 3.When finished, click OK.
![]()
Here in the above screenshot, we can see that our set has been created and visualization can be filtered accordingly.
Note: Using the tooltip that appears when you create a set using specific data points, you can add more data to the set or subtract data from the set. It is as simple as clicking the Sets drop-down icon and selecting Add/Remove option.
How To Use Sets in a Visualisation?
In the Sets section of the Data pane, after you have created a set, you will be able to see it at the bottom of the pane. As with any other field, it can be dragged into any visualization.
It is possible to show the members of a set when you drag the set into Tableau Desktop or to aggregate the members into In/Out categories when you drag the set to the visualization.
In When using Tableau Server, one can only aggregate the members of a set into In/Out categories.
Set actions allow your audience to more easily analyze your visualization.
Set Actions
The set action updates the values in an existing set based on the user’s actions in the visualization. To define the scope of the set action, you can use a set or sets that you have already created.
Set actions can be used to let your audience interact directly with your visualization, even your dashboard. As a result, they have more control over certain aspects of their analysis.
You can now define the set action to include the following:
- It applies to the source sheet or sheets.
- User behavior that initiates the action (hover, select, or menu).
- Target set (data source and set to be used).
- When the selection is cleared, what happens.
How To Create Set Actions?
Step 1.Select Worksheet >Actions from a worksheet. Select Dashboard >Actions from a dashboard.
![]()
Step 2. Click Add Action in the Actions dialogue box and then select Change Set Values.
![]()
Step 3. Enter a meaningful name for the action in the Add/Edit Set Action dialog box.
Step 4.Choose a source sheet or data source. By default, the current sheet is selected. You can select individual sheets within a data source or dashboard.
Step 5.Select how users will run the action.
- When the mouse cursor is hovered over a mark in the view, hover runs.
- When a user clicks a mark in the view, Select runs. For set actions, this option is ideal.
- The context menu appears when the user right-clicks a selected mark in the view and selects an option.
![]()
Please specify the target set. Select the data source first, followed by the set.
The Target Set lists are determined by the data source you select and the sets that you have created in the workbook that are associated with it.
This example uses World Cup Squads and Groups Extract as the data source and Team Set as the set.
As soon as the selection is cleared in the view, what happens is as follows:
- The keep set values option keeps the current values in the set.
- All possible values are added to the set when all values are added to it.
- All previously selected values are removed from the set when all values are removed.
Save your changes and return to the view by clicking OK.
![]()
Interact with the visualisation to test the set action. If necessary, adjust some of the settings for the action to adjust the selection behavior.
The following examples show just a few of the ways you can use set actions.
- Proportional Brushing
- Asymmetric Drill Downs
- Colour Scaling
- Relative Dates
Thus, these are the details on sets in tableau