Tableau Level of Detail Expressions
Level of Detail (LOD) expressions let you control the granularity of a calculation independently from the chart's current view. A standard Measure aggregates at whatever level your Dimensions define. An LOD expression locks the aggregation to a specific level you choose — regardless of what is on screen.
The Problem LODs Solve
Imagine you want to show each customer's order on a chart, but you also want to display the customer's total annual sales next to each order. The chart is at the order level. The total annual sales is at the customer + year level. Without LOD, Tableau cannot hold both levels at once. LOD expressions solve this.
Analogy: School Grades
You are viewing data at the individual test level:
Student | Subject | Test Score
Alice | Math | 85
Alice | Science | 78
Alice | English | 90
You want to add: Alice's OVERALL average across all subjects = 84.3
even while the chart is still showing individual subjects.
LOD Expression:
{FIXED [Student] : AVG([Test Score])}
→ Always computes AVG per student, regardless of chart level
→ Alice gets 84.3 on every row, even on the individual test rows
The Three Types of LOD Expressions
FIXED
FIXED computes at a level you define. It ignores Dimension filters (but not context filters). Use FIXED when you need a calculation to always group at a specific field, no matter what the chart shows.
Syntax:
{FIXED [Dimension] : Aggregation([Measure])}
Example — Total Sales per Customer (always at customer level):
{FIXED [Customer Name] : SUM([Sales])}
Usage:
Drag this field to any chart. Even if your chart groups by Order ID,
this field always returns the customer's total, not the order's total.
INCLUDE
INCLUDE adds a Dimension to the calculation that is not in the view. It computes at a more detailed level than the current chart. Use INCLUDE when you want to compute at a finer grain and then aggregate that result up to the chart's level.
Syntax:
{INCLUDE [Dimension] : Aggregation([Measure])}
Example — Average of customer totals per region:
{INCLUDE [Customer Name] : SUM([Sales])}
Usage:
If your chart is at the Region level, this computes SUM(Sales)
per Customer within each region, then returns the AVG of those
customer sums — giving average customer value per region.
Without INCLUDE: SUM(Sales) / COUNT(Customers) — divides totals
With INCLUDE: properly averages each customer's individual total
EXCLUDE
EXCLUDE removes a Dimension from the calculation even if it appears in the view. Use EXCLUDE when you want a calculation to ignore a specific Dimension and aggregate at a broader level.
Syntax:
{EXCLUDE [Dimension] : Aggregation([Measure])}
Example — Total Sales for the entire Region, ignoring Category:
{EXCLUDE [Category] : SUM([Sales])}
Usage:
Your chart has both Region and Category in Rows.
Normally SUM(Sales) gives sales per Region+Category combination.
With EXCLUDE [Category], it gives the Region total on every row —
useful for computing each category's percentage of its region total.
Diagram: Comparing FIXED, INCLUDE, EXCLUDE
Chart Dimensions: Region, Category
| SUM(Sales) | FIXED [Region] | EXCLUDE [Category]
-----------------+---------------+----------------+-------------------
East Furniture | $500 | $1,800 | $1,800
East Technology | $800 | $1,800 | $1,800
East Office Sup | $500 | $1,800 | $1,800
West Furniture | $300 | $900 | $900
West Technology | $600 | $900 | $900
SUM(Sales) = changes by Region + Category
FIXED [Region] = locked to Region total (ignores Category)
EXCLUDE [Category]= same as FIXED Region here — removes Category
Practical Use Case: Percent of Region Total
A common dashboard need: show each category's percentage of its region's total sales. This requires two different levels simultaneously.
Step 1 — Create FIXED expression for Region Total:
Region Total Sales = {FIXED [Region] : SUM([Sales])}
Step 2 — Create Percent of Region field:
Percent of Region = SUM([Sales]) / SUM([Region Total Sales])
Step 3 — Format as percentage and drag to Labels
Result:
East Furniture — $500 — 28% of East total
East Technology — $800 — 44% of East total
East Office Sup — $500 — 28% of East total
LOD Expressions and Filters
FIXED expressions ignore Dimension filters. This is intentional — FIXED always computes at its defined level regardless of what the view shows. To make a FIXED expression respect a filter, promote that filter to a Context Filter. Right-click the filter on the Filters shelf and select "Add to Context." Context filters run before LOD expressions.
When to Use Each Type
| LOD Type | Use When |
|---|---|
| FIXED | You need a value locked to a specific level always |
| INCLUDE | You need finer detail than the current chart level |
| EXCLUDE | You need coarser detail — ignore one dimension from the view |
Summary
LOD expressions control which level Tableau uses for a calculation, independently of the chart's current Dimensions. FIXED locks the level to specific fields. INCLUDE adds a finer Dimension to the calculation. EXCLUDE removes a Dimension from the calculation. LODs are powerful for computing percent of total at a parent level, comparing individual values to group averages, and mixing different granularities in one view — all without changing the chart's structure.
