top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Level of Detail in Tableau


Level Of Detail (LOD) expression allows tableau users to compute values both at data source level and visualization level giving users more control on the level granularity you want to compute. LOD expression are powerful and efficient way to solve problems involving multiple levels of aggregations in one single visualization.

They can be performed at a more granular level (INCLUDE), a less granular level (EXCLUDE) or an entirely indepdent level (FIXED).

To understand the LOD you need to understand the two key words Granularity and Level of Detail.

What is granularity

The quality of including a lots of small details, whenever we begin to work on specific dataset it is always a good to understand what the level of grain is for this data .A lots of small details in information making it possible for you to understand very clearly what is happening.

What is Level Of Detail ?

Level detail can be high level and low level

High level of detail less granular and more aggregated and while low level include the details ,more granular and less aggregated.

Fixed LOD

Fixed Level of Detail expressions compute a value using the specified dimensions ,without reference to the dimensions in the view.

Syntax - {FIXED [Dimension1],[Dimension 2] :Aggregate}

The following example can be recreated using the sample -superstore data source.




Lets drag sum of sales to text and Fixed Lod Total and we want to keep this number regardless of which other dimension displayed in our view. For this you need to create a calculated field

{FIXED :sum(sales)}

When you drag Category to rows the second column Sales represents sum of sales grouped by Category and our fixed grand total remains unchanged and it doesn't affected by dimension in view.


EXCLUDE LOD

Exclude Lod expression ,which is one of the tableau LOD is executed by removing some of the detail from the view when computing the values.

In other word, the exclude LOD expression prevents the calculation from using certain dimensions present in view and affected by dimension filter.

Syntax {EXCLUDE[Dimension List]: Aggregation}


The following Exclude Level of detail expression computes the sum of grand total sales by Category excluding furniture category from the view.


INCLUDE LOD

Include Level Of Detail expression computes values using specified dimensions in addition to whatever dimensions are present in the view and affected by dimension filter.

It puts more detail in ,so it is more granular and less aggregated.


Syntax -{ INCLUDE [Dimension lists] :Aggregations}


The following INCLUDE Level of expression computes the average regional profit for each categories


{INCLUDE [(Region) ]:[Sum(profit)]}


This is the reference cheat Sheet view shows average regional profit for each categories.


When category placed in row shelf and measure names(calculation and sum of profit) placed in column shelf ,the view computes average regional profit for each categories.


References

https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_include.htm


https://www.youtube.com/watch?v=yush1yNz9VM&t=1615s&ab_channel=sqlbelle











24 views0 comments

Recent Posts

See All
bottom of page