comparison

LOD Calculations in Tableau: A Data Analyst Exam Guide with Worked Examples

Learn FIXED, INCLUDE, and EXCLUDE Tableau LOD expressions with concrete grain, aggregation, and filter examples for Data Analyst preparation.

Updated August 6, 2026·9 min read

Quick take

Parameters are not just selectors. They are useful when readers need one dashboard to switch metrics, thresholds, or ranking logic without duplicating views.

LOD Calculations in Tableau: A Data Analyst Exam Guide with Worked Examples

Level of Detail (LOD) expressions let Tableau calculate at a grain you specify instead of accepting only the grain created by the current view. Use FIXED when the calculation must stay at named dimensions, INCLUDE when it must add dimensions to the view’s grain, and EXCLUDE when it must remove dimensions from the view’s grain. The reliable way to choose one is to state the desired grain in words before writing syntax.

Verified August 6, 2026: LOD mechanics and filter behavior below were checked against Tableau Desktop help. The examples are original practice examples, not released Salesforce questions. Salesforce currently assigns 41% of its Tableau Data Analyst prep scope to Explore and Analyze Data.

What problem does an LOD expression solve?

Every Tableau view already has a level of detail: the dimensions on Rows, Columns, Marks, Detail, and similar locations determine how many marks appear. A view of Region and Category has a region-category grain. SUM(Sales) therefore returns sales for each region-category combination.

Sometimes the business question needs another grain. You may need each customer's total sales while the view shows individual orders, an overall average while the view shows stores, or a category total while the view also shows sub-category. Tableau documents LOD expressions as a way to compute at data-source and visualization levels while controlling granularity. The calculation is not “more advanced SUM”; it is an explicit statement about which rows belong together.

The basic syntax is { FIXED [Dimension] : AGGREGATE([Measure]) }. The braces and colon matter. The text before the colon declares the grain; the expression after it declares what Tableau computes at that grain. A valid calculation can still answer the wrong question if the declared dimension is wrong.

Choose FIXED, INCLUDE, or EXCLUDE by naming the grain

ExpressionPlain-language meaningTypical question
FIXEDCalculate at exactly these dimensions, independent of view dimensionsWhat is each customer's lifetime sales?
INCLUDEAdd dimensions to the current view grainWhat is average customer sales within each region?
EXCLUDERemove dimensions from the current view grainWhat is category sales while the view includes sub-category?

Tableau describes INCLUDE as more granular and EXCLUDE as less granular relative to the visualization. FIXED is independent of the view’s dimensions. That phrase “relative to the visualization” is important: the same expression can behave differently when you change the dimensions visible in a sheet.

Worked example: compare each customer's sales with their region average

Assume a worksheet shows Customer Name, Region, and SUM(Sales). A manager asks: “Which customers are above their region’s typical customer sales?” The desired comparison is customer sales against an average calculated at the region level.

First create the regional customer average: { FIXED [Region] : AVG([Sales]) }. That formula is deliberately not correct for a transactional data set if Sales is row-level and you mean average total sales per customer. It averages individual rows, not customer totals. State the intermediate grain first: calculate sales per customer within region, then average those customer totals. One approach is to build a customer total at a fixed customer-and-region grain: { FIXED [Region], [Customer Name] : SUM([Sales]) }.

For a simpler fixed comparison, calculate total sales for each region: { FIXED [Region] : SUM([Sales]) }. Put it beside SUM(Sales) on a customer-level view. The regional total repeats for customers in the same region. Tableau documents that coarser LOD values can be replicated in a more detailed view. That repetition is useful: divide each customer’s sales by the repeated region total to produce a regional contribution percentage.

The expression SUM([Sales]) / { FIXED [Region] : SUM([Sales]) } gives 0.10, or 10% after percentage formatting, for a customer with $10,000 sales in a $100,000 region. The numerator and denominator must describe the same measure at two intentional grains.

Worked example: when INCLUDE is the better statement

Imagine a view with Region on Rows. You need average sales per customer within each region. AVG(Sales) calculates average transaction value, not average customer total. INCLUDE tells Tableau to add customer to the view grain for the calculation: { INCLUDE [Customer Name] : SUM([Sales]) }.

When Tableau evaluates this in a region-level view, it first gets a sales total for each customer and then aggregates those customer totals for the region. Tableau notes that INCLUDE expressions are at the same or a finer grain than the view and will not produce replicated values. This is the scenario to remember: include a hidden dimension because the business metric is defined at that hidden dimension.

Worked example: when EXCLUDE removes unwanted view detail

Suppose the view has Category and Sub-Category, but you want each sub-category compared to its category total. The desired denominator is category sales, so remove sub-category from the view grain: { EXCLUDE [Sub-Category] : SUM([Sales]) }.

For Furniture → Chairs with $30,000 sales and Furniture total $100,000, use SUM([Sales]) / { EXCLUDE [Sub-Category] : SUM([Sales]) }. The result is 30%. Tableau says EXCLUDE values are replicated in the view and default to ATTR when placed on a shelf because Tableau is not changing their aggregation. A repeated category total is expected here; it is evidence that the expression successfully ignored sub-category.

The FIXED-filter trap candidates should test

Many wrong LOD answers are actually filter-order errors. Tableau’s LOD overview explains that filters execute in a defined order. A FIXED expression can be evaluated before ordinary dimension filters, which means a dimension filter you expect to change the denominator may not do so. Tableau’s documented solution when you want those filters to apply to FIXED is to make the filter a context filter, or consider whether INCLUDE or EXCLUDE better captures the intent.

Test rather than guess. Create { FIXED [Region] : SUM([Sales]) }, filter the view to one category, and observe whether the regional total changes. Then make the category filter context and observe again. The goal is not to treat context as a magic fix; it is to know which question the denominator is meant to answer: regional sales across all categories, or regional sales within the selected category.

Practice prompts that reveal the grain

Write the grain first for each prompt:

  • “Show each order's sales compared with the customer’s total.” Desired denominator: customer.
  • “Show each category's share of total sales while sub-category is visible.” Desired denominator: category; EXCLUDE sub-category.
  • “Show average customer sales by region.” Hidden grain: customer within region; INCLUDE customer.
  • “Show every row next to its customer’s first purchase date.” Desired grain: customer; FIXED customer with MIN(Order Date).

If you cannot name the denominator’s grain, do not choose syntax yet. Dragging fields until a number looks plausible is not a reliable analytical method.

FAQ: Are LOD expressions the same as table calculations?

No. LOD expressions control calculation granularity relative to data and the view. Table calculations operate on values already in the visualization and have their own addressing and partitioning rules.

FAQ: Does FIXED always ignore filters?

No. Tableau’s order of operations determines which filters apply. Ordinary dimension filters may not affect a FIXED calculation; context filters can be used when the intended result requires the filter to apply.

FAQ: Which LOD type is best for a percent of total?

The right type depends on the denominator’s grain. Use EXCLUDE when the denominator should remove a visible dimension, FIXED when it should be independent of the view, and INCLUDE when the metric must first calculate at a hidden finer grain.

Put LOD practice in the wider exam plan

Use the Tableau certification complete guide for the broader credential path, then compare this topic with table calculations in Tableau and live connections versus extracts. The Tableau study guide provides the core practice sequence. For a second explanation of a calculation you are debugging, use the SimpuTech Tableau study coach.

Verification disclosure: LOD mechanics and filter behavior were verified against Tableau Help and Data Analyst certification-preparation scope against Salesforce Trailhead on August 6, 2026. Product and preparation details can change; confirm current official guidance before an exam.

Ready to pass Tableau Desktop Specialist?

Get the complete study package

📄 Tableau Desktop Specialist Study Guide PDF

125+ pages · Practice questions · Study plan · Exam cheat sheets

Get the PDF — $19

🤖 AI Study Tutor

Unlimited Q&A · Instant explanations · Personalized to Tableau Desktop Specialist

Try SimpuTech Free →

Use code TABLEAU50 — 50% off first month

More Tableau Desktop Specialist resources