Sets in Tableau
Sets in Tableau
Sets in Tableau
Create Sets
• You can use sets to compare and ask questions about a subset of data
• Sets are custom fields that define a subset of data based on some conditions
• You can make sets more dynamic and interactive by using them in Set Actions
• Set actions let your audience interact directly with a dashboard to control aspects of their analysis
• When someone selects marks in the view, set actions can change the values in a set
• In addition to a Set Action, you can also allow users to change the membership of a set by using a filter-like interface
known as a Set Control, which makes it easy for you to designate inputs into calculations that drive interactive analysis
Create A Dynamic Set
• There are two types of sets: dynamic sets and fixed sets
• The members of a dynamic set change when the underlying data changes
• General:
Use the General tab to select one or more values that will be considered when computing the set.
You can alternatively select the Use all option to always consider all members even when new members are added or removed.
• Condition:
Use the Condition tab to define rules that determine which members to include in the set.
For example, you might specify a condition that is based on total sales that only includes products with sales over $100,000
• Top:
Use the Top tab to define limits on what members to include in the set.
For example, you might specify a limit that is based on total sales that only includes the top 5 products based on their sales.
The new set is added to the bottom of the Data pane, under the Sets section. A set icon indicates the field is a set.
Create A Fixed Set
• The members of a fixed set do not change, even if the underlying data changes
In the visualization, select one or more marks (or headers) in the view.
In the Create Set dialog box, type a name for the set.
If you created a set using specific data points, you can add more data to or subtract data from the set.
In the visualization, select the data points you want to add or remove.
In the tooltip that appears, click the Sets drop-down menu icon, and then select Add to [set name] or Remove from [set name] to add
• After you create a set, it displays at the bottom of the Data pane in the Sets section
• You can drag it into the viz like any other field.
• When you drag a set to the viz in Tableau Desktop, you can choose to show the members of the set or aggregate the
members into In/Out categories.
• In Tableau Server or Tableau Online you can only aggregate the members of the set into In/Out categories.
Show In/Out members in a set
• In most cases, when you drag a set to the viz, Tableau displays the set using the In/Out mode
• For example, in a set defined for the top 25 customers, the top customers would be part of the In category and all other
customers would be part of the Out category.
• Using the In/Out mode makes it easy to compare the members in the set to everything else
To show In/Out members in the visualization:
• In Tableau Desktop, right-click the set in the visualization workspace and select Show In/Out of Set.
• When a set is in In/Out mode, the field on the shelf is prefaced by the text, "IN/OUT", followed by the set name.
Show Members In A Set
• As an alternative to showing the set using In/Out mode, you can list the members in the set
• Showing the members in the set automatically adds a filter to the view that includes only the members of the set.
In the visualization workspace, right-click the set and select Show Members in Set.