Select Page

What is a Level of Detail and how do I use them? Released in Tableau 9.0, LODs Expressions can be a daunting topic to wrap your head around – especially if you don’t come from a maths or SQL background. Over the next blogs I will explain what are LODs, the difference between Include, Fixed, and Exclude, how to read them, and when to use them. For this blog series, I will be using the Superstore dataset as it’s a familiar dataset to most Tableau users.

To start, let’s begin with the basics and zoom out a bit with some theory. It’s easiest to understand LODs when we first go through the concept of granularity.

### Granularity – What does each row represent?

Examining granularity, the state or quality of being composed of many individual pieces or elements, starts by looking at your data set’s structure and asking yourself ” What does each row in this dataset represent?”.

The most granular, deepest, and the lowest level of detail is what each row in your dataset represents – also referred to as a ‘grain’. In the case of the superstore dataset, each row in the dataset represents a singular order. On the other hand, the least granular, most aggregated and the highest level of Superstore is the total US orders.

Granularity and aggregation work on opposite spectrums of each other and forms the basis of all analysis. Whether we’re exploring the breakdown of sales per customer or the total profit of a company, we are always aggregating or disaggregation values. What we need to know when we make analyse our data to explore insights is what level of detail we want to answer our questions.

### Navigating Level of Detail in Tableau

In Tableau, there are 3 ways of adding or reducing the level of detail in our viz.

##### 1. Shelves

The first way is by placing dimensions or measures on our column and row shelves. The more pills we place on our shelves, the deeper our level of detail. Respectively, our view will be sliced and change according to the items we place on our shelves.

##### 2. Detail Button

The second way relates to the ‘Detail’ button on our marks card. The more dimension pills I place into ‘Details’ in the marks card, the deeper our level of detail. Note how in my first image, the viz shows a ‘Region’ level of detail. Respectively, the viz only has 4 marks for each region. In the second image, by placing the ‘State’ dimension into the ‘Detail’ button on the marks card, I have instructed Tableau to show the more granular and deeper ‘State’ level of detail, thus there are now state lines showing in the viz and there are 49 marks – one for each state in the dataset.

##### 3. LOD Expressions

The first two methods of navigating our level of detail are effective for answering questions on the same level of detail. However, these methods will always change our viz and don’t allow us to answer questions requiring different level of details. The third way, LOD expressions, is a syntax allow us to calculate equations in the viz background without changing the viz itself. The three types of expressions are FIXED, INCLUDE, and EXCLUDE.

With this core understanding of Level of Details in Tableau, we can now move onto the LOD expressions.

#### Read more from the How To Use Level of Detail in Tableau series:

How To Use Level of Details – Include Function

How To Use Level of Details – Exclude Function

How To Use Level of Details – Fixed Function