What is LOD in Tableau? - CNDRO.LLC
3184
post-template-default,single,single-post,postid-3184,single-format-standard,wp-custom-logo,theme-bridge,bridge-core-2.9.4,woocommerce-no-js,tribe-no-js,ehf-template-bridge,ehf-stylesheet-bridge-child,qode-page-transition-enabled,ajax_fade,page_not_loaded,,qode-title-hidden,qode_grid_1300,footer_responsive_adv,hide_top_bar_on_mobile_header,columns-4,qode-child-theme-ver-1.0.0,qode-theme-ver-27.8,qode-theme-bridge,qode_header_in_grid,wpb-js-composer js-comp-ver-6.7.0,vc_responsive,elementor-default,elementor-kit-2634

What is LOD in Tableau?

An introduction to the concept of Level of Detail(LOD) expressions in Tableau.

Photo by path digital on Unsplash

Level of Detail (LOD) are expressions that give a user the privilege to control data computations on different levels of granularity in Tableau. We can perform simple or complex computations at a more granular level (INCLUDE LOD), or at a less granular level (EXCLUDE LOD), or at an independent level (FIXED LOD).

The LOD expressions in Tableau allows you perform aggregations that are unavailable at a certain level of visualization.

Types of LOD Expressions in Tableau

We have three types of LOD Expression in Tableau, they are;

  • INCLUDE
  • EXCLUDE
  • FIXED

INCLUDE LOD

In Include LOD, the INCLUDE expression will include an additional dimension along with the one specified by the user. i.e. It brings including the view dimension into the calculation

The Syntax of the INCLUDE LOD is usually in the form below;

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

 

Step by step process on how to create INCLUDE LOD

Step 1

To Demonstrate this, we will use Superstore DATASET

Open Tableau Desktop and create a new worksheet

Step2

Drag Region to column and Sales to Rows

The next thing to do is to create LOD using the calculated field.

Step3

Create a new calculated field, then write this;

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

The next thing is to drag the calculated field to the rows beside our sales. We should have 2 bar charts displayed.

Now, change the aggregation type of the sales per customer. We will do this by right clicking on the pill in our view and change it to Average.

We should have our visualization like this:

EXCLUDE LOD Expressions

The EXCLUDE level of detail or LOD in Tableau is used when we wish to leave out a dimension from the view level of detail. This is the opposite of what we saw in the INCLUDE LOD where a dimension from the view level of detail was being added with the user-specified dimension.

The syntax for EXCLUDE LOD Expressions is in the form below:

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

Step by step process on how to create EXCLUDE LOD

Step1

Open a new worksheet

Step2

Drag the region and sales to the rows and Order Date to Columns.

We should have a line graph by default but we can change it to Bar chart using the Marks card. Our new visualization should look like this;

Step3

Create a new calculated field and put the code below;

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

 

Now, we will drag our newly calculated field to color on the marks card, for which we would generate this visualization.


FIXED LOD EXPRESSIONS

In the Fixed LOD type, the calculation only considers or computes the data values based on user-specified dimensions. It does not take into account the dimension present in the view.

The syntax for FIXED LOD Expressions is in the form below:

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

 

Step by step process on how to create FIXED LOD

Step1

Open a new worksheet

Step2

Drag Region and States to the columns.

Step3

Let’s create a calculated field for Sales by Region using the formula

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

 

Let us drag the newly calculated field Sales by Region to Rows. We have this visualization;

Hope you found this post helpful. Thanks for reading.

No Comments

Post A Comment