top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Design Smarter Dashboards with Tableau’s LOD Superpowers


Introduction

 

When working with data in Tableau, calculations are usually driven by the dimensions present in your view. But what if you want a calculation to stay consistent, no matter how the visualization changes?

 

This is exactly where Level of Detail (LOD) expressions come in.

 

LOD expressions allow you to define the level at which a calculation should be performed, giving you full control over data detail and helping you build accurate, reliable dashboards. In this blog, you’ll learn what LOD expressions are, why they matter, and how to use FIXED, INCLUDE, and EXCLUDE with practical examples.


What Is Level of Detail (LOD) in Tableau?

 

Level of Detail (LOD) in Tableau refers to the granularity at which data is calculated—in simple terms, how detailed your calculation is.

It defines which dimensions Tableau uses to aggregate a measure, regardless of what is shown in the visualization.

 

Example:

  •  Sales by Year → high-level detail

  • Sales by Year + Region → more detail

  • Sales by Year + Region + Customer -> very detailed

By default, Tableau calculates values based on the dimensions placed in the view. LOD expressions allow you to control this behavior.

 

Why Level of Detail Matters

 Without LOD control:

  • Numbers may change when you add or remove dimensions.

  • Totals may repeat across rows.

  • Business metrics may become inaccurate.


With LOD:

  • Calculations stay consistent.

  • You can compare detailed values to overall totals.

  • Complex business logic becomes possible.


Types of Level of Detail Expressions


Tableau provides three LOD expression types:

  • FIXED – Calculates at a specific level

  • INCLUDE – Adds extra detail to the calculation

  • EXCLUDE – Removes detail from the calculation


All three give you precise control over how data is aggregated.


FIXED LOD :

The FIXED LOD expression is used to calculate a measure at a specific level of detail, ignoring the dimensions in your current view. This ensures that your calculations remain consistent, even if you add or remove fields from the visualization.


Syntax:

      {FIXED [Dimension]: AGG([Measure])}

Example:


This is an example for which I created LOD for fixed condition with only one dimension.



Next step is for adding multiple dimensions. Create calculated field for category &Region sales as shown below.



Right now, your SUM(Sales) is being calculated at the combination of Sub-Category and Region because both are in the view.

What this does:

  • Ignores the Region dimension in the chart.

  • Calculates the total sales only at the Sub-Category level.

  • The total for each Sub-Category will remain the same, no matter which Regions are displayed or filtered.




chart displays sales broken down by Sub-Category and Region. Each bar represents sales for a specific Sub-Category within a Region. To show consistent totals across all regions, a FIXED LOD expression is used with two dimensions .

INCLUDE LOD :

It adds lower‑level detail to your calculation by including dimensions that aren’t present in the view.

Syntax:

{INCLUDE [Lower Level Dimension]: AGG([Measure]) 

Example:



This chart displays total Sales by Category for Furniture, Office Supplies, and Technology.

Each bar represents the overall sales for that category, calculated at the Category level, not broken down by any lower-level dimensions such as Region, or Sub-Category.




Below chart displays  Total Sales and Average Sales per product by Category:



These charts compares total sales with the average sales per product across each category. The top chart displays total category sales using standard aggregation. The bottom chart uses an INCLUDE LOD expression to calculate average sales at the product level, even though products aren’t shown in the view. This allows Tableau to pull in hidden detail like product average during calculation. The result is a clearer, more normalized comparison of category performance. It’s a powerful technique for blending detail with high-level clarity.


EXCLUDE LOD:

It removes specific dimensions from the view’s level of detail before performing the calculation, even if those dimensions are currently displayed.


Syntax:

{ EXCLUDE[Dimension]: AGG[Measure]) }

Example:



Below chart breaks down sales by category and region, with each bar showing regional performance. The tooltip reveals both regional sales and total category sales, demonstrating the use of an EXCLUDE LOD expression. Tableau uses to remove Region from the calculation, even though it’s visible in the view. This allows the chart to display consistent category totals across all regions. It’s a powerful way to show high-level metrics alongside detailed breakdowns.


This chart shows sales by category and region, with each bar representing a region’s contribution. The tooltip reveals both regional sales and total category sales, highlighting the use of an EXCLUDE LOD expression. Tableau calculates to remove Region from the level of detail. This lets it compute total sales per category, even while displaying regional breakdowns. The result is a consistent category total across all regions. It’s ideal for showing high-level metrics alongside detailed views.



Conclusion:

Level of Detail (LOD) expressions help you control how Tableau calculates your data, instead of letting the view decide for you. They are especially useful when you want your numbers to stay consistent, even as you add or remove dimensions from your charts.

By using FIXED, INCLUDE, and EXCLUDE, you can solve many common Tableau problems—such as repeated totals, changing numbers, or confusing averages. FIXED lets you lock a calculation at a specific level, INCLUDE allows you to bring in extra detail without showing it in the view, and EXCLUDE helps you ignore certain dimensions while still displaying them.

For beginners, LOD expressions may feel complex at first, but with practice, they become one of the most powerful tools in Tableau. Start small, test your calculations, and gradually apply them to real business questions. Once you understand LODs, you’ll be able to create clearer, more accurate, and more trustworthy dashboards.


+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page