BlogTableau

Tableau Sets: What They Are and How to Use Them for Advanced Analysis

Obed Tsimi
Obed Tsimi
Founder & Senior Tableau Architect
·July 4, 20269 min read

Tableau Sets define a custom subset of dimension members — IN or OUT of a specified condition. Combined with set actions, they enable cohort analysis, top-N comparisons, and highlight interactions that filters cannot produce.

Sets in Tableau are user-defined subsets of members from a dimension. They are binary — a member is either in the set or out of it — and they can be used in calculations, on shelves, and in set actions to create interactive comparisons. Despite being one of Tableau's more powerful features, sets are significantly underused. This guide covers what sets are, how to create them, and the advanced analysis patterns they enable.

What a set is

A set is a named field that evaluates to IN or OUT for every member of a dimension. For a Customer Name dimension with 10,000 members, a set called "Top 100 Customers by Revenue" would evaluate IN for the 100 highest-revenue customers and OUT for the remaining 9,900.

That IN/OUT field can be used anywhere in Tableau: as a filter, as a colour encoding, in a calculated field (IF IN(set) THEN ... END), or as a dimension on a shelf to split a view between in-set and out-of-set members.

Sets are distinct from filters in a critical way: a filter removes data from the view. A set keeps all data visible but segments it. The out-of-set members are still in the view; they are just labelled OUT.

Fixed sets vs computed sets

**Fixed sets** are a static list of members you define manually. Right-click a dimension header, select Create Set, choose the members. Fixed sets do not update with data. If you manually select five customers, those five customers are in the set regardless of what the data says about their current revenue. Fixed sets are useful for hard-coded groupings: a list of strategic accounts, a list of pilot markets, a cohort defined by date range.

**Computed sets** are dynamic — defined by a condition or a top/bottom N threshold that re-evaluates with each data refresh. A "Top 10 Products by Profit" computed set always contains whichever 10 products are highest-profit given the current filters. Computed sets can use Condition (a formula that evaluates true/false for each member) or Top/Bottom (rank by a measure, keep the top or bottom N, or top/bottom N%).

Most analytical use cases benefit from computed sets. Fixed sets are appropriate when the group membership is a business definition, not a data-driven calculation.

Creating a set in Tableau

1. In the Data pane, right-click the dimension you want to segment.

2. Select **Create > Set**.

3. In the dialog, choose **General** (fixed, select members), **Condition** (formula-based), or **Top** (rank-based).

4. Name the set descriptively — "Top 20% Customers by Revenue", not "Set 1".

5. Click OK. The set appears in the Data pane under Sets with a Venn diagram icon.

For a computed set using a condition, the formula evaluates against the dimension's members. For a Top N set, you specify the measure and N — Tableau ranks dimension members by that measure and assigns IN to the top (or bottom) N.

Combined sets

Two sets on the same dimension can be combined into a new set using set operations:

- **Union**: members that are IN either set

- **Intersection**: members that are IN both sets

- **Except**: members IN the first set but NOT in the second

Right-click either set and choose Create Combined Set. Combined sets enable cohort comparisons: "customers who purchased in Q1 AND purchased in Q2" (intersection) vs "customers who purchased in Q1 but NOT Q2" (except from Q1 set).

This is where sets become analytically powerful — cohort retention, product overlap, cross-sell penetration, and segment transition analysis all use combined sets.

Using sets in calculations

The IN/OUT evaluation of a set is accessible in calculated fields:

To get the aggregate measure for only in-set members, use a conditional SUM with ELSE 0. To label in-set vs out-of-set, use IF IN(set) THEN "Top Customers" ELSE "Other" END. Set membership can drive colour, size, label, and tooltip — any visual encoding driven by a calculated field.

Because set membership re-evaluates when filters change (for computed sets), calculations built on sets stay current with the dashboard state without requiring calculated field updates.

Set actions

Set actions are the most powerful set feature. They connect user interaction — hover, click, menu select — to set membership. When a user clicks a mark, the clicked member is added to (or replaces) a set. That set membership then drives other views.

A set action requires:

1. A target set defined on a dimension

2. The action configured under Dashboard > Actions > Add Action > Change Set Values

3. The source sheet (what the user clicks), the run-on trigger (select/hover/menu), and the target set

4. Behavior: Assign values to set (selected marks replace set membership) or Add/Remove values from set (cumulative)

Set actions enable the most common advanced Tableau pattern: click a customer in one chart, see that customer's detail in all other charts. The clicked customer is added to a set; that set is used as a filter or calculation input in all other sheets; the views update.

This is more powerful than traditional dashboard filtering because:

- You can compare in-set members to out-of-set members (not just filter out the rest)

- Clearing the selection reverts to the unfiltered state without a separate reset button

- Multiple selections are supported (add-to-set behavior)

Cohort retention analysis with sets

The canonical advanced use of combined sets is retention analysis:

1. Create a set "Active in Month N" for each month you want to analyse — each a computed set filtering customers with purchases in that month

2. Create combined sets: "Active Month 1 AND Month 2" (intersection), "Active Month 1 NOT Month 2" (except), etc.

3. Build a table showing the intersections — this is a cohort retention matrix

For Tableau, the practical implementation uses date parameters rather than individual sets per month, with dynamic set logic using LOD expressions and set conditions based on parameter values. The result is a retention curve that updates when the user changes the cohort month via a parameter.

Top-N analysis with set controls

A common dashboard pattern: let the user choose whether to view the top 5, 10, or 20 items. Implementation:

1. Create an integer parameter (Top N, values 5/10/20)

2. Create a computed set on the dimension using Top with the parameter as N

3. Use the set in the view — drag to Colour, or use as a shelf dimension to show in-set vs out-of-set

When the user changes the parameter, the set re-evaluates and the view updates. This is cleaner than a filter because the out-of-set members remain visible (as an "Other" category) rather than being filtered out.

Common mistakes

**Using a filter instead of a set for comparison analysis**: If you want to compare a segment to the rest of the data, a filter removes the rest. A set keeps the rest. Always use sets when the analysis requires seeing both the segment and its complement.

**Creating fixed sets when you need computed sets**: Fixed sets hardcode membership. If your "top customers" changes monthly, a fixed set does not update. Use computed sets for any data-driven segmentation.

**Naming sets cryptically**: "Set 1" and "Set 2" in the Data pane are unmaintainable. Name sets precisely: "Top 20 Products by YTD Margin", "Churned Customers Q4".

For the broader Tableau context these techniques fit into, see tableau lod expressions and tableau performance optimization. Our Tableau consulting practice builds production dashboards using these advanced features — book a scoping call to discuss your analytics requirements.

Get your data architecture audit in 30 minutes.

A former Microsoft data architect audits your data foundation, identifies your top priorities, and sends you a written plan. Free. No pitch.

Book a Call →