Was this page helpful?
Yes No
Have a comment? Please leave it here. Thanks for your feedback!
All Tableau Help > Tableau Desktop and Web Authoring Help > 
Applies to: Tableau Desktop

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.

In this article

Create a dynamic set

Create a fixed set

Use sets in the visualization

Show In/Out members in a set

Combine Sets

Examples of Sets

Create a dynamic set

The members of a dynamic set change when the underlying data changes. Dynamic sets can only be based on a single dimension.

To create a dynamic set:

  1. In the Data pane, under Dimensions, right-click a field and select Create > Set.

  2. In the Create Set dialog box, configure your set. You can configure your set using the following tabs:

  3. When finished, click OK.

    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. A fixed set can be based on a single dimension or multiple dimensions.

To create a fixed set:

  1. In the visualization, select one or more marks (or headers) in the view.

  2. Right-click the mark(s) and select Create Set.

  3. In the Create Set dialog box, type a name for the set.

  4. Optionally complete any of the following:

  5. When finished, click OK.

    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.

Use sets in the visualization

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. This mode separates the set into two categories:

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:

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.

Note:In/Out mode is not available in workbooks created before version 8.2 that use Microsoft Excel or text file data sources, workbooks that use the legacy connection, or workbooks that use Microsoft Access data sources.

Show Members in 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.

To switch a set to list the individual members:

Note: To display the fully qualified member names for cubes, right-click the set in the Data pane and select Qualify Member Names.

Combine Sets

You can combine two sets to compare the members. When you combine sets you create a new set containing either the combination of all members, just the members that exist in both, or members that exist in one set but not the other.

Combining sets allows you to answer complex questions and compare cohorts of your data. For example, to determine the percentage of customers who purchased both last year and this year, you can combine two sets containing the customers from each year and return only the customers that exist in both sets.

To combine two sets, they must be based on the same dimensions. That is, you can combine a set containing the top customers with another set containing the customers that purchased last year. However, you cannot combine the top customers set with a top products set.

To combine sets:

  1. In the Data pane, under Sets, select the two sets you want to combine.

  2. Right-click the sets and select Create Combined Set.

  3. In the Create Set dialog box, do the following

  4. When finished, click OK.

Note: This functionality is not available in workbooks created before version 8.2 that use Microsoft Excel or text file data sources, workbooks that use the legacy connection, or workbooks that use Microsoft Access data sources.

Examples of Sets

There are many ways you can use sets to answer complex questions and compare cohorts of data. Below are some examples of ways you can use sets to define and compare subsets of data.