Friday, February 20, 2015

What Are Sets in Tableau and When Should You Use Them?

This article is to provide a quick overview of what sets are and when they are most commonly used. 

Firstly, a set is a custom field that you create in Tableau Desktop that represents a group of members in a dimension matching a specific criteria. For example, if you have a map of sales revenue by state, you could very quickly shade the map for states that are above x-dollars in sales using a set, where x represents a user-defined threshold of sales revenue. For readers that are familiar with statistical concepts, this is the same as cohort analysis.

The three main uses of a set are:

  • Create a subset of the data – select one or more dimension members that are of interest you. This sales threshold example above represents this usage. However, sets can be static as well, so that the members of the set are manually selected by the user and will not change over time.
  • Create unique encodings – combine dimension members to create unique encodings. This approach allows the user to create a set that combines two dimensions into one. E.g. Product and Region. A set of Product and Region would create a cross join of the members from both dimensions, so that a user could quickly filter out combinations such as West, Furniture; or East, Office Supplies; etc. 
  • Save filters for a later use – once you have created a set, you can treat it like a filter to only show members of that set within your view. However, unlike a quick filter, sets don’t have to be recreated for each worksheet because they are saved and are accessible across all worksheets within the workbook.
Although sets cannot be referenced directly by secondary data sources, it is possible to reference such sets with the use of calculated fields. This method can be very helpful when wanting to filter down a view from one data source with a set existing in another data source. This mimics a “blended set”, even though sets cannot be used directly by different data sources from which are originally based off of.

For a video tutorial on sets, check out the following resource:

http://www.tableau.com/learn/tutorials/on-demand/sets

3 comments: