What is a Set?

If you have ever wanted to highlight a specific group of data points in Tableau without deleting the rest of the chart, you need sets. While a standard filter simply throws away the data you don't pick, sets let you separate your data into two clear buckets ('IN' and 'OUT'), based on a rule or selection:

  • IN: The items that meet your criteria.
  • OUT: Everything else.

Since Tableau keeps both buckets on the screen, you can compare them side by side. For example, you can:

  • Colour the target items one colour and leave all other items gray.
  • Compare the total revenue of your target group against the rest of the business.
  • Write calculations like: IF [Target Customers] THEN [Sales] END.

The 3 Types of Sets:

1. Constant Sets

You pick the members manually by ticking boxes on a list.

  • Tableau saves the exact list you selected.
  • However, it never updates automatically. If new data comes in next week, you have to add it by hand.
  • Best for: Lists that do not change, such as a fixed list of test stores or specific product lines from a past campaign.
  • Creating a constant set:
    • Highlight the members you want in the set directly in the visualisation.
    • Right click on them and select 'Create Set'.
    • Name the set and press 'OK' to create the set.

2. Computed Sets

You give Tableau a condition and it assigns members automatically based on that rule. It recalculates the members whenever the data updates.

  • General (Pattern Matching & Selection): This tab allows you to select values directly or use a search/wildcard rule (e.g. including any customer whose name contains "Corp"). If new data enters your system that matches that pattern, Tableau automatically pulls it into the set.
  • Conditional (Thresholds & Formulas): This tab checks your data against a numerical threshold or custom calculation. For example, you can set a rule where an item is IN only if SUM([Sales]) > 10000. You can also write custom boolean formulas (e.g. SUM([Profit]) / SUM([Sales]) > 0.15 for margins above 15%).
  • Top (Rankings): This tab dynamically ranks your data and keeps the highest or lowest performers. For example, you can target the "Top 10 Products by Profit" or the "Bottom 5 Stores by Sales." You can also connect this to a Parameter so dashboard viewers can choose their own number (e.g. Top 5, Top 10 or Top 20).
  • Creating a computed set:
    • In the left pane, click on the dimension in which you want a set.
      Select 'Create' then 'Set'.
    • Name your set first so you don't forget what the set is for.
    • For General - Select the 'General' tab and then either 'Select from List', 'Custom Value List' or 'Use All' depending on your needs.
    • For Conditional - Select the 'Condition' tab and then either 'By Field' (gives you drop down options for the condition) or 'By Formula' (allows you to write your own formula).
    • For Top - Select the 'Top' tab and then either 'By Field' (gives you drop down options for the ranking) or 'By Formula' (drop down and you write your own formula).
    • Once you have done this, click 'OK' and your set will be created.

3. Combined Sets

You can take two existing sets built on the same dimension and merge them.

  • All members: Keeps everyone from both Set A and Set B.
  • Shared members: Keeps only the items that appear in both Set A and Set B.
  • A Except shared members: Keeps items in Set A but removes any that also appear in Set B.
  • B Except shared members: Keeps items in Set B but removes any that also appear in Set A.
  • Creating a Combined set:
    • Right click on the set you want as your Set A and select 'Create Combined Set'.
    • Name your set first so you don't forget what the set is for.
    • To the right under the heading 'How would you like to combine the two sets?', select what set you want as your Set B.
    • Select the combination option you want.
    • Click 'OK' to create the combined set.

Sets and Tableau's order of operations:

Calculated sets function before standard dimension filters in Tableau's order of operations. For example, if you create a set for the top 5 products across an entire business and then add a regular filter for Europe, the chart may appear totally blank. This is because Tableau picked the overall top 5 products first and none of those may have sales in Europe.

To fix this, right click on the region filter on the filters shelf and click "Add to Context". This forces Tableau to filter down to Europe first and then calculate the top 5 products within Europe.

Author:
Holly Phillips
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
© 2026 The Information Lab