Ultimate Guide to Level of Detail or LOD in Tableau (2024)

The right Business Intelligence Tool is the key to success in the current market. Tableau is one such powerful data visualization tool. Tableau aims to eliminate complications and present data in the most informative way, through charts and graphs.

No matter what level of complexity you have with your data, Tableau can crack it with its best-in-class functionalities. Tableau can transform your calculations into visualizations. This is exactly where we come across the Level-Of-Detail or LOD Expressions in Tableau.

What Are LOD Expressions in Tableau?

To understand the LOD Expressions in Tableau, you need to understand the problems faced while computing aggregations on data on different levels of details. It is often much more complex to find answers to the questions, as the level of granularity (minute details) in the data increases gradually.

Master Tableau in No Time!

Tableau Desktop Specialist Certification TrainingExplore Program

Ultimate Guide to Level of Detail or LOD in Tableau (1)

For Example:

Picture this, you own an OTT service providing similar functionalities to Netflix. And using Tableau, you can find general insights explaining like:

  • Genres
  • Top-Watched movie
  • Least-Watched Movie
  • Highest Ratings
  • Least Rating and many more

But what if you wanted to find some information with minute details?

Like, the specific days in a month or a week where you received the maximum number of views for a particular movie.

The LOD Expressions in Tableau help to resolve the same. The LOD Expressions were introduced to Tableau from its ninth release, the Tableau 9.0. The LOD expressions in Tableau make you capable of performing aggregations that are unavailable at a certain level of visualization.

The LOD Expression is highly precise and can be implemented in the most discrete and irrational ways.

Advancing, you will understand the Syntax of LOD Expressions in Tableau.

Syntax of LOD Expressions in Tableau

The general syntax for the LOD Expressions in Tableau follows the Syntax as shown below.

The syntax for INCLUDE LOD Expressions in Tableau:

{[ INCLUDE ] < declaration of the dimension > : <expression to aggregate>}

The syntax for EXCLUDE LOD Expressions in Tableau:

{[ EXCLUDE ] < declaration of the dimension > : <expression to aggregate>}

The syntax for FIXED LOD Expressions in Tableau:

{[ FIXED ] < declaration of the dimension > : <expression to aggregate>}

To understand the LOD Expressions in Tableau in a much better and interactive way, it’s time to dive into the next segment. You will practically understand the various

Master Tableau in No Time!

Tableau Desktop Specialist Certification TrainingExplore Program

Ultimate Guide to Level of Detail or LOD in Tableau (2)

types of LOD expressions and execute them practically.

Types of LOD Expressions in Tableau

There are three different types of LOD Expressions in Tableau. They are:

  1. INCLUDE
  2. EXCLUDE
  3. FIXED

You will learn about each one of them in detail with practical examples. You will use the superstore dataset and try to extract some insights from the data available.

INCLUDE LOD Expressions

It implements the INCLUDE Level of Detail Expression when there is a need to calculate finer levels of detail in the database and then later re-aggregate it and present it at a coarser level. As the dimensions are added or removed from the view, the fields based on the INCLUDE LOD expressions will vary.

How to create INCLUDE LOD Expressions?

  • Please create a new sheet and rename it "INCLUDE Sheet" for reference
  • To implement the LOD Expressions, you need to create a visualization
  • Drag region to columns, and sales to rows
  • Tableau will autogenerate a bar chart as shown below

Ultimate Guide to Level of Detail or LOD in Tableau (3)

  • Now the next step is to create a calculated field
  • Select the analysis option, choose the "Create Calculated Field" option

Ultimate Guide to Level of Detail or LOD in Tableau (4)

  • Now our next step is to add the formula to the calculated field

{INCLUDE [Customer Name] : SUM([Sales])}

Ultimate Guide to Level of Detail or LOD in Tableau (5)

  • Now drag the newly created calculated field from the measures panel to rows
  • Tableau will automatically create two bar charts, as shown below

Ultimate Guide to Level of Detail or LOD in Tableau (6)

  • Now, the last step is to change the aggregation to average
  • To do so, right-click on the "sales per customer" pill
  • Select the "Measure" option
  • Click on the average option in the drop-down

Ultimate Guide to Level of Detail or LOD in Tableau (7)

  • The resultant visualization will be as shown below.

Ultimate Guide to Level of Detail or LOD in Tableau (8)

With that, you will now head to the next type of LOD Expressions in Tableau, which is the EXCLUDE LOD Expressions in Tableau.

EXCLUDE LOD Expressions

EXCLUDE Level of Detail Expressions can help eliminate the dimensions from lower granularity levels and concentrate on calculating the dimensions from the higher level of granularity.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program

Ultimate Guide to Level of Detail or LOD in Tableau (9)

How to create EXCLUDE LOD Expressions?

The below-mentioned steps are followed to generate the EXCLUDE LOD Expressions.

  • Please create a new sheet and rename it as "EXCLUDE sheet" for reference
  • Create a new calculated field
  • Go to Analysis
  • Select the option of "Create Calculated Field"

Ultimate Guide to Level of Detail or LOD in Tableau (10)

  • Rename the Calculated field as EXCLUDE Calculation
  • Write the following formula in the calculation field

{ EXCLUDE [Region] : SUM([Sales])}

Ultimate Guide to Level of Detail or LOD in Tableau (11)

  • Now you must drag the region and sales to the rows
  • And order date to columns (aggregate the date to month-wise)

Ultimate Guide to Level of Detail or LOD in Tableau (12)

  • Tableau will automatically create a line graph
  • To present it in a readable way, change it to the bar graph
  • Go to the marks card and change the option from automatic to bar chart

Ultimate Guide to Level of Detail or LOD in Tableau (13)

  • The updated visualization looks like this

Ultimate Guide to Level of Detail or LOD in Tableau (14)

  • Now drag the EXCLUDE calculation to colors on the marks card

Ultimate Guide to Level of Detail or LOD in Tableau (15)

  • The previous step will help you improve the readability of the visualization
  • The final visualization is as follows

Ultimate Guide to Level of Detail or LOD in Tableau (16)

Next, you will understand how to create the FIXED LOD Expressions in Tableau.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program

Ultimate Guide to Level of Detail or LOD in Tableau (17)

FIXED LOD Expressions

FIXED Level of Detail Expression is designed to apply calculations only on the specific dimensions. It does not reference the remaining dimensions in view while the FIXED LOD expressions are implemented.

How to Create FIXED LOD Expressions?

The following procedures will help us create the FIXED LOD Expressions in Tableau.

  • Please create a new sheet and rename it as "FIXED Sheet" for reference
  • Go to the Analysis option and create a new calculated field

Ultimate Guide to Level of Detail or LOD in Tableau (18)

  • Rename the calculated field as "Sales by Region"
  • Write down the following formula in the calculated field section

{ FIXED [Region] : SUM([Sales])}

Ultimate Guide to Level of Detail or LOD in Tableau (19)

  • Now drag Region and States to the columns.
  • Let us drag the "Sales by Region" calculation field to rows
  • The resultant visualization will look something like this below

Ultimate Guide to Level of Detail or LOD in Tableau (20)

With this, you will move to the next part, where you will learn the fundamental differences between the Table and LOD Expressions in Tableau.

Master Tableau in No Time!

Tableau Desktop Specialist Certification TrainingExplore Program

Ultimate Guide to Level of Detail or LOD in Tableau (21)

Table v/s LOD Expressions in Tableau

The table below explains the major differences between a Table and LOD Expressions.

Table

LOD Expressions

Filters behave as "HIDE" operations when implemented in Table

Filters behave as "EXCLUDE" operation when implemented in LOD Expressions

It generates table Calculations as overall query outputs

It creates LOD Expressions as a part of the overall query to the data source beneath

Table calculations generate either comparable or less granular results than promised

LOD Expressions can generate results independent of said granularity

It implements table calculations as aggregated measures

It can utilize LOD Expressions in other constructs

Dimensions that control the operations of a table are separate from the calculation syntax.

It embedded dimensions that control the operations of a LOD in the expression itself.

In the next section, you will look into the limitations of LOD Expressions in Tableau.

Take your data analysis skills to the next level and learn how to use Tableau to uncover insights, identify trends, and make informed decisions. Our free course will teach you how to connect to your data, create interactive dashboards, and share your findings with others.
Enroll now and start unlocking the power of data!

Limitations of LOD Expressions in Tableau

Following are the major limitations that are needed to be considered while using the LOD Expressions in Tableau.

  • LOD Expressions behave unreliable views when floating values are involved
  • LOD Expressions will not be shown in the Data Source
  • When referencing a dimensionality declaration parameter, always use the parameter name and not the parameter value
  • With data blending, the primary data source's linking field must be in the view before you can use a LOD expression from the secondary data source.

With that, you have reached the end of this "Lod Expressions in Tableau - the All in One Guide" article.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program

Ultimate Guide to Level of Detail or LOD in Tableau (22)

Next Steps

Data Blending in Tableau can be your next stop. Data Blending in Tableau will help you combine relative data sources and extract insights with ease.

Want to enhance your skills and gain in-depth knowledge about Tableau Software to become certified as a Business Intelligence Professional? Feel free to explore Simplilearn's Tableau Desktop Specialist Certification Training. The program is designed by top subject matter experts and delivered by leading practitioners in the field to help you move forward in your career.

If you have any queries concerning this article, please feel free to leave them in the comments section at the end of this article, and our team of experts will answer them for you at the earliest!

Ultimate Guide to Level of Detail or LOD in Tableau (2024)
Top Articles
Latest Posts
Article information

Author: Twana Towne Ret

Last Updated:

Views: 6534

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Twana Towne Ret

Birthday: 1994-03-19

Address: Apt. 990 97439 Corwin Motorway, Port Eliseoburgh, NM 99144-2618

Phone: +5958753152963

Job: National Specialist

Hobby: Kayaking, Photography, Skydiving, Embroidery, Leather crafting, Orienteering, Cooking

Introduction: My name is Twana Towne Ret, I am a famous, talented, joyous, perfect, powerful, inquisitive, lovely person who loves writing and wants to share my knowledge and understanding with you.