Everything There Is To Know About LOD Expressions

LOD (level of detail) expressions in Tableau allow you to show values at a different level of detail or level of granularity than a visualisation is set at. This enables you to show calculations which are independent of the dimensions in a specific visualisation.

The syntax for an LOD expression is the same regardless of the type of expression you would like to calculate. The syntax is as follows:

Breakdown of the LOD syntax

There are three types of LODs - Fixed, Exclude and Include.

FIXED LODs:

  • Provide a level of detail that is independent of the view in a visualisation
  • Only refers to the dimension specified in the expression for the level of granularity it outputs, so it doesn’t matter or factor in any other expressions that are in the view
  • The expression returns a scalar, i.e. a singular value
  • Are not affected by dimension filters applied to a visualisation

EXCLUDE LODs:

  • Provide a level of detail that excludes dimensions from a visualisation
  • Respects and identifies all the dimensions that are in a visualization or view but will exclude the dimensions stated in the expression
  • The expression returns an ATTR value, which is an aggregated value
  • These are affected by dimension filters in the visualisation or view
  • Provide a higher level of detail/lower level of granularity output as it removes the dimensions that are specified in it’s expression  

INCLUDE LODs:

  • Provide a level of detail that adds dimensions to your visualisation, even if they’re not present in the visualisation
  • The expression returns an ATTR value
  • These are affected by dimension filters in the visualization or view
  • Provides an output that has a higher level of granularity/lower level of detail, as it includes dimensions that are specified in it’s expression

PRO TIP:
When building an LOD expression, it's good practice to build a text table in tableau first. This will highlight which dimensions you need to include in your LOD expression (if any) and will also allow you to sense-check and validate the numbers from your output.

Tableau's order of operation is as follows:

Tableau's order of operations

Given Tableau's order of operations, it's important to consider the most suitable LOD expression in your visualisation when there are dimension filters present. Any existing dimension filters in a visualisation will not have any impact on a FIXED LOD in your visualisation, as tableau operates this before dimension filters.

In order to have any existing dimension filters have an impact on FIXED LODs, you will need to change it to a context filter. This is often okay but can impact the performance of a dashboard, particularly when working with large datasets.

Author:
Amy Afriyie
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab