Introduction to Level of Detail (LOD)

Level of detail expressions (LOD) expressions allows you to compute values at the data source level and the visualization level. However, LOD expressions give you even more control on the level of granularity you want to compute. They can be performed at a more granular level.

What’s happening in the background:

Syntax for LOD
{KEYWORD [Dimension Declaration] : AGGREGATE ([EXPRESSION]) }

Types of LOD

There are three main types of LOD expressions:

• Fixed – Calculates the aggregation at the level of detail specified in the calculated field regardless of any dimension in the view.
e.g. { FIXED [Region] : SUM ([Sales]) }

A fixed level of detail expression also ignores all the filters in the view other than context filters, data source filters and extract filters

• Include – Calculates the aggregation at the level of detail specified by the dimensions in the view and the dimensions included in the calculated field. This will potentially result in the calculation of the aggregation at a lower level of detail than the view.

e.g. { INCLUDE [Customer Name] : SUM ([Sales]) }

Include level of detail expressions are most useful when including a dimension that isn’t in the view

• Exclude – Calculates the aggregation at the level of detail specified by the dimensions in the view, excluding any listed in the calculated field. This will potentially result in the calculation of the aggregation at a higher level of detail than the view.

{ EXCLUDE [Region] : SUM ([Sales]) }

Exclude level of detail expressions are most useful for eliminating a dimension in the view.

How LOD’s are used in filters:

Above is an introduction to LOD’s. For a detailed explanation about FIXED, INCLUDE and EXCLUDE LOD’s click on the link: https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod.htm
To practice LOD’s click on the link: https://www.tableau.com/about/blog/LOD-expressions