# 1. Why Use LOD Expressions?

Overview

LOD expressions provide you with the ability to combine data at different levels of granularity within a single view. This lesson explains why this new Tableau feature is so powerful.

To explore more Kubicle data literacy subjects, please refer to our full library.

Summary

Why use LOD expressions?

- LOD expressions enable you to combine different levels of granularity in the same view
- Prior to Tableau 9, this was a big weakness of Tableau
- The ability to use LOD expressions is essential for creating more complex visualisations
- 4 different LOD expressions exist in Tableau, all of which we will explore in this course

Transcript

As you have seen in previous courses Tableau enables you to create compelling visualizations very quickly.

The trade-off however, as you may have experienced is that Tableau is sometimes not as flexible as Excel particularly when it comes to analyzing data at different levels of detail.

Thankfully, in Tableau version 9 the software introduced a new concept called level of detailed expressions to combat some of this inflexibility.

For advanced analysis in Tableau understanding level of detail expressions is absolutely critical.

In this course, I am going to use a couple of different datasets to highlight some of the important use cases of LOD expressions.

However, in this lessons, let's start off by understanding the need for LOD expressions in more detail.

As you have seen in our course on calculations we have both row-level calculations and aggregate calculations in Tableau.

For row level calculations, each calculation is performed individually on each row. So, for example, if I have three stores with revenue and profit figures, and want to calculate the profit margin a row level calculation in Tableau will calculate the profit margin separately for each store.

In contrast to row calculations we have aggregate calculations.

In the example above, where I want to find the profit margin for the three stores an aggregate calculation will sum the revenue, sum the profit and from these two numbers give me the overall margin.

Before Tableau 9, these two data points could not be mixed.

Which is severely limiting Tableau's flexibility for many different use cases such as cohort analysis, benchmarking and much more.

In this course, the primary case study we are going to use is for a software company with 1000 customers based across the United States.

And we will use a number of LOD expressions to perform some calculations at a state, regional and national level.

Now let's move to the dataset.

Moving to the data set, we can see the following columns include starting on the left-hand side we have company name, number of users within that company annual revenue, the street that the company is located on city, state, zip, region and sub-region.

We also have payment date and sales person.

With this dataset, we'll be able to explore almost all of what LOD expressions have to offer in Tableau.

So now let's import this dataset into Tableau.

In Tableau, I'll go to an Excel file, select the file that I want and click open.

I'll drag in the sales data sheet And as you can see, this correctly includes all of the different data types that I want in my Tableau dashboard.

And in the next lesson, we'll get started by learning about the four different types of LOD expressions and building our first expression in a Tableau workbook.

Formulas in Tableau
Level of Detail Expressions

Contents

03:39

04:00

06:18

06:03

05:20

05:36

06:42

05:04

#### 9. Final Thoughts on LOD Expressions

03:27

My Notes

You can take notes as you view lessons.

Sign in or start a free trial to avail of this feature.