Level of detail (LOD) calculations in Tableau allow you to define custom sets of data and perform calculations at different levels of granularity. This can be useful when you want to perform calculations on a specific subset of data, or when you want to compare data at different levels of detail.
There are three types of LOD calculations in Tableau:
- Fixed LOD calculations: These calculations allow you to specify a set of dimensions and perform a calculation at a fixed level of detail. For example, you might use a fixed LOD calculation to find the average sales by region, where the region is the fixed level of detail.
- Include LOD calculations: These calculations allow you to include additional dimensions in your calculation, without changing the level of detail. For example, you might use an include LOD calculation to find the average sales by region, but include the product category as an additional dimension in the calculation.
- Exclude LOD calculations: These calculations allow you to exclude dimensions from your calculation, without changing the level of detail. For example, you might use an exclude LOD calculation to find the average sales by region, but exclude a specific product category from the calculation.
To create an LOD calculation in Tableau, you will need to use the calculation editor, which is accessed through the "Analysis" tab in the toolbar. You can specify the level of detail for your calculation using the brackets notation, for example: {FIXED [Region]: AVG([Sales])}.
Lets Learn More about the various Level of Detail Calculations in Tableau
There are three types of level of detail (LOD) calculations in Tableau: fixed, include, and exclude. Here are some examples of how you might use each type of LOD calculation:
- Fixed LOD calculations: These calculations allow you to specify a set of dimensions and perform a calculation at a fixed level of detail. For example, you might use a fixed LOD calculation to find the average sales by region, where the region is the fixed level of detail.
Here is an example of a fixed LOD calculation in Tableau:
{FIXED [Region]: AVG([Sales])}
This calculation will find the average sales for each region in the data set.
- Include LOD calculations: These calculations allow you to include additional dimensions in your calculation, without changing the level of detail. For example, you might use an include LOD calculation to find the average sales by region, but include the product category as an additional dimension in the calculation.
Here is an example of an include LOD calculation in Tableau:
{INCLUDE [Product Category]: AVG([Sales])}
This calculation will find the average sales by region, but will include the product category as an additional dimension in the calculation. The result will be a separate average sales value for each combination of region and product category.
- Exclude LOD calculations: These calculations allow you to exclude dimensions from your calculation, without changing the level of detail. For example, you might use an exclude LOD calculation to find the average sales by region, but exclude a specific product category from the calculation.
Here is an example of an exclude LOD calculation in Tableau:
{EXCLUDE [Product Category]: AVG([Sales])}
This calculation will find the average sales by region, but will exclude the specified product category from the calculation. The result will be a separate average sales value for each region, excluding the specified product category.
It is important to note that LOD calculations can be used in combination with other calculations and functions in Tableau to perform more complex analysis. You can use the calculation editor to create custom LOD calculations to suit your specific needs and requirements.