Hands-On Guide to Tableau Sets
How to Sets in Tableau
Sets in Tableau are used to create subsets of data based on certain conditions defined by the user. For example, a set can be created for having a subset data of top 10 customers with the highest sales. If you are looking for more ways to improve your Tableau visualizations, check out Tableau for Data Science course.
There are two types of sets: “dynamic set” and “fixed set”. In Tableau, sets can only be created based on dimension fields.
In this article I am going to brief about the following topics related to sets:
- Create dynamic sets
- Create fixed sets
- Use of sets
Create Dynamic Sets:
As the name suggests, the values/members in the dynamic sets get change when the underlying data changes.
Steps to create dynamic sets:
- Right-click a dimension field (on which user wants to create set) and select “Create Set” option
- In the “Create Set” window, there are further 3 ways in which user can customize the set. Following are the 3 ways:
- General: The “General” tab provides an option for a user to select one or more required values from the list. The selected values will be considered when the set is being computed. Also, if needed, a user can select “Use All” option to consider all values always even when new values are being added or removed
- Condition: The ‘Condition’ tab is used to define the conditions that determine what values to include in the set.
For example, a user can apply a condition of having only those value where the sales are greater than $50,000
- Top: The “Top” tab is used to select only specified ‘N’ number of top or bottom values.
For example, a user can apply a condition of having only top 10 customers with based on the profits
Create Fixed Sets:
The values/members in the fixed sets do not get change when the underlying data changes.
Steps to fixed dynamic sets:
Consider a scatter chart of Products across Sales and Profit. Following are the steps to create a fixed set out of this scatter chart
- In the chart, select one or more scatter dots
- Right-click over the selected scatter dots and select “Create Set” option
- Enter the name of the set in the “create set” dialog box and click “ok”.
Use of sets:
- Once the set is being created, if the user drags the created set into sheet view, the set gets separated into two categories:
IN: the values/members which are part of the set
- The IN/OUT feature of the set can be readily used as a filter whereby using IN/OUT option, a user can toggle between the “members of the set” to “members which are not part of the set”
- A user can also show the value/members set directly. Showing the members of the set automatically adds an “IN-Set” filter to the view that includes only the members of the set