Tableau LOD (Level of Detail) expressions let you compute aggregations at a different granularity than the view — answering questions like "what is the first purchase date per customer regardless of how the view is filtered." This guide explains FIXED, INCLUDE, and EXCLUDE LOD expressions with practical use cases.
Tableau LOD (Level of Detail) expressions are calculations that compute aggregations at a different granularity than the current view. Standard Tableau aggregations (SUM, AVG, COUNT) always compute at the granularity of the view — the combination of dimensions on rows, columns, and marks. LOD expressions break that constraint, letting you compute a measure at a specified level of detail and bring the result back into the view at a different granularity.
Why LOD Expressions Exist
The classic problem they solve: you want to show sales by region, but also show each region's percentage of total sales (not as a quick table calculation, but as a stable computed field). The total requires a calculation across all customers — but the view is at region level. Without LOD expressions, you'd need a data prep step or complex workaround. With a FIXED LOD, you compute the total once, and Tableau uses that value regardless of how the view is filtered or dimensioned.
FIXED LOD Expressions
FIXED computes an aggregation at a specified set of dimensions, ignoring the view's dimension context entirely.
Syntax: {FIXED [dimension1], [dimension2] : AGGREGATE(measure)}
Example: {FIXED [Customer ID] : MIN([Order Date])} returns the first order date for each customer. If you place this in a view with both Region and Customer ID on rows, every row for a given customer shows the same first order date — the calculation is fixed to customer, not to customer-region.
The power: FIXED is unaffected by view filters (except context filters). If you filter the view to show only 2024 orders, a FIXED LOD computing first order date still returns each customer's true first order date across all time — unless you explicitly promote the date filter to a context filter.
Common FIXED use cases:
- Cohort analysis: assign customers to acquisition cohort regardless of which time period the view shows
- Customer-level metrics in region or product views (average order value per customer, lifetime value)
- Computing a denominator for percentage of total that doesn't shift when filters change
- Deduplication: count distinct customers by computing {FIXED [Customer ID] : COUNTD([Order ID])} and then summing
INCLUDE LOD Expressions
INCLUDE adds dimensions to the calculation that are not in the view, computing at a more granular level than the current view and then aggregating the result up to view level.
Syntax: {INCLUDE [dimension] : AGGREGATE(measure)}
Example: In a view by Region, {INCLUDE [Customer ID] : SUM([Sales])} computes sales per customer within each region, then aggregates to region level. The visible result is the average per-customer sales within each region (when you wrap the LOD in AVG) — not the same as average order sales, which doesn't account for the customer level.
INCLUDE is useful when you want the view at a coarser granularity but the underlying calculation requires a finer one. "Average basket size per customer by region" requires per-customer computation even though the view shows regions.
EXCLUDE LOD Expressions
EXCLUDE removes a dimension from the calculation that would otherwise be included by the view.
Syntax: {EXCLUDE [dimension] : AGGREGATE(measure)}
Example: In a view with both Category and Sub-Category dimensions, {EXCLUDE [Sub-Category] : SUM([Sales])} computes total sales at Category level regardless of which sub-category the current mark represents. This is useful for computing a ratio: [Sales] / {EXCLUDE [Sub-Category] : SUM([Sales])} gives each sub-category's share of its parent category's sales.
EXCLUDE is the rarest of the three LOD types. It removes context that the view provides, which is the inverse of the more common need to add context (INCLUDE) or specify context explicitly (FIXED).
LOD Expressions and Filters
Understanding how Tableau's order of operations affects LODs is essential:
**Dimension filters** (dragging a dimension to the Filters shelf) execute after FIXED LODs. A FIXED LOD computes on the full dataset, then the dimension filter is applied to the view — but the LOD result is not recalculated. This means FIXED LODs reflect the full, unfiltered dataset by default.
**Context filters** (right-click > Add to Context) execute before FIXED LODs. FIXED LODs compute on the context-filtered dataset. Use context filters when a FIXED LOD should respect a particular filter (e.g., only compute cohort assignments for customers in a specific country where country is a context filter).
**Data source filters** execute before all LODs — they filter at the data source level before any computation.
**Measure filters** execute after all LODs and table calculations — they filter on computed values.
Performance Considerations
LOD expressions generate additional SQL queries or subqueries, depending on the data source. In live connection mode, each LOD expression typically generates a separate query that is joined to the main query. Complex dashboards with many LOD expressions can generate many queries, increasing load time.
For Tableau extracts, LODs are computed during extract generation and cached — they're fast at view time but add to extract build time.
Best practices: minimize FIXED LODs in high-cardinality dimensions (FIXED by transaction_id on a billion-row table generates a very large intermediate result); prefer table calculations for purely view-level aggregations where the context doesn't need to be locked; and consider whether the LOD can be pre-computed in dbt or the data model rather than computed dynamically in Tableau.
Practical LOD Patterns
**First/Last date per entity:** {FIXED [Customer ID] : MIN([Order Date])} — customer acquisition date regardless of view filters.
**Conditional aggregation by cohort:** FIXED LOD assigning customers to a cohort based on first purchase characteristics, then using that cohort assignment as a dimension in the view.
**Percentage of total:** SUM([Sales]) / SUM({FIXED : SUM([Sales])}) — the empty FIXED (no dimension specified) computes the grand total across the entire dataset.
**Peak day metric:** {FIXED [Customer ID] : MAX({FIXED [Customer ID], [Order Date] : COUNTD([Order ID])})} — nested LODs computing a nested aggregation.
Our Tableau consulting services covers LOD expressions, advanced calculations, and performance optimization across complex Tableau implementations. Contact us to discuss your Tableau development requirements.
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 →