Sets are special fields in Tableau that define a grouping of data by effectively identifying each underlying record of data as in or out of the set based on certain conditions you define.
However, I like to think of sets as special kinds of filters that enable you to share findings made in one worksheet across other worksheets in your workbook.
You can use sets in Tableau to express specific combinations of dimensions and facts within the data source. Sets can be static (manually selected marks) or dynamically defined (based on value ranges).
Sets can be created in different ways:
- Multi-selecting marks.
- Right-clicking on a filed in the dimensions shelf.
- Combining sets on the set shelf.
In this block I am looking at the first 2 ways to create sets and the following post will focus on Combination Sets.
- Multi-selecting marks:
This is a fast and intuitive way to create your sets.
Hold the left mouse button down and draw a box around the marks you want to save.
This will automatically open the Tooltips. Select the Create Set menu to expose the dialog box.
In the dialog box you can remove categories or specific records by hovering the mouse over them and clicking the (x) icon that will appear. You can rename the set. Then clicking the OK button will add a new shelf below the measures shelf that includes the set.
- Right Clicking on a field:
Right-click on the field display in the dimension shelf and select Create Set option.
The resulting dialog box gives you the option of selecting individual dimension members (under the General tab) or setting specific conditions that define whether the data belongs to the set (under the Condition or Top tab).
Sets will appear in their own section in the Data window, you can now drag the set fields onto shelves in the view. Sets can use one of two models that can be changed using the drop down menu in the field:
- Show In/Out of Set: The sets slices the data based on whether the underlying records are in or out of the set.
- Show Members in Set: A filter is added to keep only the members of the set.
Now it’s your turn, start practicing!!!