Level of detail (LOD) expressions in Tableau are a powerful feature that allow you to calculate values at different levels of granularity in your data.

Fixed LODs, in particular, allow you to specify the level of granularity at which a calculation should be evaluated, regardless of the level of detail in the view.

This can be useful in a variety of situations, such as when you want to compare values across different dimensions or when you want to exclude certain dimensions from your calculation.

A Use Case

One common use case for fixed LODs is to calculate a value for a specific dimension, regardless of the level of detail in the view.

For example, let’s say you have a sales dataset that includes information about sales by product, region, and year. You might want to compare the sales for each product across different regions and years, but you don’t want the comparison to be affected by any filters or dimensions in the view. In this case, you could use a fixed LOD expression to calculate the total sales for each product, regardless of the level of detail in the view.

To create a fixed LOD expression in Tableau, you first need to select “Create Calculated Field” from the Analysis menu. Then, you can use the following syntax:

{ FIXED [Dimension]: expression }

For example, to calculate the total sales for each product, regardless of the level of detail in the view, you could use the following expression:Fixed LOD Expression - Sales for all products

This expression will calculate the sum of sales for each product, regardless of any other dimensions in the view.

Order of Operations

It’s important to note that fixed LODs follow a specific order of operations in Tableau. First, all context filters will apply, then any fixed LOD expressions are applied.

This means that fixed LODs are calculated after any context filters, and before any other filters, aggregations, or measures.

Tableau Order of Operations

Tableau Order of Operations

This allows fixed LODs to create more advanced calculations that involve multiple dimensions and measures.

In summary, fixed LOD expressions in Tableau are a powerful tool that allow you to specify the level of granularity at which a calculation should be evaluated. They can be used to compare values across different dimensions or to exclude certain dimensions from a calculation. By using fixed LODs, you can gain a deeper understanding of your data and make more informed decisions.

The Data School
Author: The Data School