Tableau sets are named subsets of dimension members that can be used in calculations, filters, and visual encodings to compare in-set vs out-of-set performance, highlight members meeting dynamic conditions, and build analysis that segments the data along custom-defined lines. Sets are one of the most underused Tableau features despite being central to many of the most analytically sophisticated dashboard patterns.
Tableau sets are named subsets of dimension members. They define which members of a dimension belong to a defined group — the "in" members — and implicitly which do not — the "out" members. Once defined, a set can be used in calculations, filters, and visual encodings anywhere in the workbook. The in/out membership drives comparative analysis patterns that would otherwise require complex calculations or separate views.
Sets are one of the most underused features in Tableau relative to their analytical power. Many analysts learn calculated fields and LOD expressions before discovering sets, and then find that many patterns they built with complex calculations are cleaner and more maintainable with sets.
Fixed Sets vs Dynamic Sets
Tableau has two fundamentally different set types:
**Fixed sets** — membership defined by explicit selection. The analyst right-clicks dimension members in a view and selects "Create Set," or manually specifies members in the set editor. Membership is static: the same members are in the set regardless of data changes or filter context. Fixed sets are appropriate for permanent analytical segments — key accounts, strategic products, priority regions — that are defined by business decision rather than data condition.
**Dynamic sets** — membership defined by a condition applied to the data at query time. A dynamic set using a condition ("Top 10 customers by revenue") or a top-N rule ("top N by revenue") recomputes membership when data changes or when the context around the set changes. Dynamic sets are appropriate for ranking, threshold-based segmentation, and any analysis where the set should adapt to data or filter context.
The key difference: fixed set membership is determined at authoring time and is explicit. Dynamic set membership is determined at query time and can change as data changes.
Set Controls
Set controls (introduced in Tableau 2020.2) give dashboard users direct control over set membership — similar to parameter controls, but for set membership rather than variable values. A set control displayed in a view shows all dimension members as a checklist, allowing users to add or remove members from the set interactively.
Set controls are powerful for use cases where the analytical group is user-defined rather than data-defined: a portfolio analysis where a portfolio manager selects which products to include in their portfolio; a scenario comparison where an executive selects which regions to include in a custom peer group.
In/Out Calculations
The primary way sets are used in calculations is through the IN/OUT operator:
IF [Top 10 Customers] THEN "Top 10" ELSE "Other" END
This produces a string field that segments every row as belonging to the set or not. Use this field for colour encoding, filter conditions, or further conditional logic.
For quantitative comparisons:
SUM(IF [Top 10 Customers] THEN [Revenue] END) / SUM([Revenue])
This calculates the revenue share of the set — what fraction of total revenue comes from the top 10 customers.
Set Actions
Set actions (introduced in Tableau 2018.3) allow dashboard interactions to change set membership. When a user clicks or selects marks in a view, a set action can add those marks' dimension values to a set, remove them, or replace the current set membership entirely.
Set actions enable several high-value dashboard patterns:
**Click-to-include comparative analysis** — a user clicks on a customer in a customer list view. That customer is added to a "Selected Customers" set. A chart on the dashboard shows the selected customers' metrics highlighted against the full population.
**Drill-down with persistent selection** — a user selects a group of products from a scatter plot. The selection is captured in a set via a set action. A detail view filters to show only the selected products. The user can deselect in the scatter plot and the set — and the detail view — retains the selection until explicitly changed.
**Portfolio builder** — a user checks items in a list view using a set control or selection. A summary view aggregates the metrics for the selected portfolio. The user can iteratively add and remove items, with the summary updating in real time.
Sets in Table Calculations
Sets interact with table calculations in a specific way that enables competitive benchmarking patterns. An example:
A "Strategic Accounts" set marks the organisation's top accounts. A table calculation computes the rank of each customer within the set and outside the set separately — showing how strategic accounts rank against each other and how non-strategic accounts rank against each other.
This in-set/out-set comparison is cleaner with a set than with an equivalent calculated field approach, which would require reproducing the set membership logic in every calculation that references it.
Combined Sets
Two sets defined on the same dimension can be combined into a new set representing their intersection, union, or difference. The combined set behaves like any other set — it can be used in calculations, filters, and encodings.
Common combined set patterns:
**Intersection** — customers who appear in both "High Revenue" and "High Growth Rate" sets — the accounts that are both large and growing.
**Difference** — customers in "High Revenue" but not in "Top Account Status" — large accounts that have not been formally designated as strategic, representing an account management gap.
Combined sets are a clean way to express compound segmentation logic that would otherwise require nested IF/AND calculations.
Sets vs Calculated Fields for Segmentation
The choice between a set and a calculated field for segmentation depends on the nature of the segment:
**Use a set when** the segment is used across multiple calculations and views, when the segment membership needs to be user-controllable (via set controls or set actions), or when the segment is defined by a top-N or threshold condition that should recompute dynamically.
**Use a calculated field when** the segmentation logic is complex and conditional, involving multiple dimension values or arithmetic conditions that the set editor cannot express directly.
A practical guideline: if the segmentation can be expressed as a set condition cleanly, use a set — it makes the membership explicit and reusable. If the segmentation requires a calculation to express, use a calculated field.
Performance Considerations
Dynamic sets that use top-N conditions or complex data conditions execute additional queries at render time. For published views with high concurrency, a dynamic set that recomputes for every session can add query load. Consider:
**Fixed sets for stable segments** — if the "Key Accounts" definition changes monthly, not every query, a fixed set updated monthly is more performant than a dynamic set recomputing on every query.
**Context filters for top-N sets** — a top-N dynamic set respects context filters. If the "Top 10 by Revenue" set should rank within a filtered context (top 10 by region), the filters defining that context should be promoted to context filters so the set membership reflects the filtered state.
**Materialising complex set logic** — for very complex segmentation that drives performance issues, materialising the segment membership in the underlying data source (a flag column in the database) and importing it as a dimension is more performant than computing it in Tableau at query time.
Our Tableau consulting practice designs advanced Tableau analytics using sets, set actions, and parameter-driven analysis for enterprise clients — contact us to discuss analytical design for your Tableau environment.
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 →