Sets: Constant, Computed and Combined

This blog will give a simple explanation of what sets are, and how they can be used with examples for different types of sets.

What are sets?

Sets in Tableau are custom fields that define a subset of data based on conditions. They allow you to compare and analyse specific segments of data in a dynamic and flexible way.

Types of sets

Constant Sets

  • A set created by manually selecting members from a dimension
  • Stays the same unless you manually edit it — even if the data changes.

Example:

If we had a shopping list and wanted to create a sperate group of 5 items for breakfast we can create a constant set to define this group:

  1. Right click on the ingredients dimension to create a set
  2. Select create
  3. Click on Set
  4. Name your set ‘Breakfast’
  5. Manually Select the items you want in your breakfast
  6. Drag the newly created Breakfast set to colour
image.png

Computed Sets

  • Members of the set are DYNAMIC and will change when the underlying data changes.
  • There are three types: general, condition or top.

Example:

Following on from our shopping list we have a list of potential meals we can create from a list of ingredients. However due to the cost of living crisis, we only want to make the meals which are £3.50 or less. In order to determine what these meals are we can use a conditional set:

  1. Right click on the Meal dimension to create a set
  2. Click on the conditional tab
  3. Change the name to Cheapest Meals
  4. Select by field
  5. Find the SUM of ‘Price’
  6. Change the sign to <= and type 3.5
  7. Select Ok and drag Cheapest Meals to colour
image.png

Combined Sets

  • These set are made up of two different sets to compare their members.
  • Lets you compare overlap, difference, or union between sets.
  • This is only possible if the two sets are based on the same field.

Example:

Based on our previous example of finding the cheapest meals, lets assume we want to find the cheap and easiest meals combined( easiest meals refers to the bottom 3 meals which have the least amount of ingredients). We can create a combined set based on meals below £3.50 AND the least amount of ingredients:

Create easiest meal set:

  1. Right click on the ‘Meal’ dimension to create a set
  2. Click on the Top tab
  3. Change the name to Easiest Meals
  4. Select by field
  5. Set to bottom 3 by ‘Ingredients’ by Count (Distinct)
  6. Select Ok
image.png

Create combined set:

  1. Right click on created ‘Cheapest Meals’ set
  2. Create Combined Set
  3. Name set ‘Cheap and Easy Meals’
  4. Select Easiest meals as the other set to join to
  5. Select Shared members in both sets(inner join)
  6. Select OK
  7. Drag combined set to the rows
image.png
Author:
David Gandary
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab