
Tableau defines LOD calculations as:
Level of Detail expressions (also known as LOD expressions) allow you to compute values at the data source level and the visualization level. However, LOD expressions let you control the granularity you want to compute. They can be performed at a more granular level (INCLUDE), a less granular level (EXCLUDE), or an entirely independent level (FIXED).
Foundation of a LOD calculation
Just like a SQL query, there are specific ‘keywords’ to a LOD calculation. In SQL, you have a select statement, from statement and may also have a variation of other keywords to query specific cohorts of data.
Let’s look the keywords needed to create a LOD calc:
- Curly brackets {} : open/close the LOD calc
- Type of LOD : FIXED, EXCLUDE, INCLUDE
- Dimension(s): Declare dimension level of LOD
- : colon: separates dimension levels and aggregated measure
Example of a FIXED LOD Calc:
{ FIXED [Dimension1] , [Dimension2] : SUM(Measure)}
Remember, you can add multiple dimensions to the LOD calculation this just adjust the level of detail based on the type of LOD used.
TYPES OF LOD Calculations:
- FIXED : calculating based on specific dimensions noted in the LOD calc syntax (without reference to the current worksheet view)
- EXCLUDE : removing dimensions from the level of detail
- INCLUDE : using specific dimensions; in addition to current worksheet view
Remember, filters are ignored by FIXED LODs; except for data source, extract, and context filters
You don’t have to note any dimensions in the LOD calculation, if none are listed it will calculate at the data source level. For example below:
{FIXED : SUM(Sales)} : This calculates the sum of sales for the entire scope of the data source.
{FIXED : MAX(Date)} : This also works on dates where the LOD calculates the max date of the entire data source (good to use when wanting to report a Max Date of your visualization).
Make sure you check out the following link below to confirm LOD calculations are supported by your specific data source.
https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_constraints.htm
Below is a quick view of LOD calculation examples using the default Superstore dataset:
Check out the quick video I created to follow through the dashboard with me:

