EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login

LOD Expressions in Tableau

By Priya PedamkarPriya Pedamkar

Home » Data Science » Data Science Tutorials » Tableau Tutorial » LOD Expressions in Tableau

LOD Expression in Tableau

Introduction to LOD Expressions in Tableau

In this article, we will discuss LOD Expressions in Tableau. A visual analytics tool doesn’t just impart users the ability to generate visual insights from data. Rather, it also provides them the ability to aggregate data as per the requirement. However, performing the task of data aggregation isn’t simple in every situation, and sometimes certain technical and functional complexities may be involved. To take the task of aggregation further, the concept of aggregation at the view and calculation based aggregation comes into the picture. Here, dimensions act as levels that affect the aggregation. In Tableau, the concept of LOD (Level of Detail) allows manipulating aggregation of a measure based on the requirement.

Types of LOD Expressions in Tableau

There are three types of LOD expressions in Tableau they are as follows.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

  • FIXED LOD Expression: In this type, the level of aggregation remains fixed, as mentioned in the calculated field.
  • INCLUDE LOD Expression: In this type, data can be aggregated on any dimension at view level along with the one mentioned in the calculated field.
  • EXCLUDE LOD Expression: In this type, data can be aggregated on any dimension at view level except the one mentioned in the calculated field.

Creating LOD Expressions in Tableau

We’ll now look into the procedure to create and use LOD expressions in Tableau. For this demonstration, we are going to use the Distribution Volume dataset. The dataset contains volume distributed across major regions in India by distribution unit. Important dimensions are the Distribution Unit, Region, DU Code, Mode, and City, while Distribution Volume is the measure in the dataset.

Through the illustrations, we’ll learn the applications of the various types of LOD expressions. Let’s proceed with the demonstration as follows.

1. Load the requisite dataset into Tableau. For this, click on “New Data Source” under the Data menu. Alternatively, click on “Connect to Data”.

Lod Expressions in Tableau 1.1

2. From the window that pops-up, select the requisite data source type. In this case, the data source type is MS Excel, so click on Microsoft Excel.

Lod Expressions in Tableau 1.2

3. The loaded data can be seen in the “Data Source” tab. Examine the data prior to proceeding to the analysis.

Lod Expressions in Tableau 1.3

4. Moving to the sheet tab, the dimensions, and the measure can be seen in the respective sections.

Lod Expressions in Tableau 1-4

5. Now, we’ll be exploring the procedure to implement the three LOD expressions, one-by-one. Initially, just bring dimensions Region and Distribution Unit into Rows region and drag the measure Distribution Volume over Text in the Marks card. We get a tabular representation of data as below. Note, we have got Distribution Volume figures by Distribution Unit by Region.

Lod Expressions in Tableau 1.5

6. In order to create a LOD expression, first, we need to create a calculated field. So, right-click anywhere in the blank portion in the Data tab, and select “Create Calculated Field”, click on that. This is as illustrated in the below screenshot.

Popular Course in this category
Tableau Training (4 Courses, 6+ Projects)4 Online Courses | 6 Hands-on Projects | 39+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (6,121 ratings)
Course Price

View Course

Related Courses
Business Intelligence Training (12 Courses, 6+ Projects)Data Visualization Training (15 Courses, 5+ Projects)

Lod Expressions in Tableau 1.6

7. In the create field section, observe the following code. The “FIXED” computes an aggregate based on specified dimensions only. So, the following code takes care of the fact that whatever dimension we may include in the analysis, the aggregation will always be done on the Region dimension only.

Lod Expressions in Tableau 1.7

8. The newly created calculated field “VOL_By_Region” can be seen in the Measures section as shown below.

Lod Expressions in Tableau 1.8

9. Now, bring Region and Distribution Unit dimensions into Rows region and drag VOL_By_Region dimension over Text in the Marks card. The hierarchy for distribution area is Region -> Distribution Unit -> City. However, we can find that distribution units have the same values in a region. This is due to the fact that aggregation has been fixed at the Region level.

Lod Expressions in Tableau-1.9

10. Now, we want to fix the aggregation level but ensure that aggregation can be done at other dimensions also at the view level. This can be accomplished by INCLUDE LOD expression. We created a calculated field to achieve this, which is as shown below. Observe, INCLUDE [Distribution Unit] ensures that, now, along with this dimension, average aggregation is possible on other dimensions too.

Image -1.10

11. The newly created dimension AVG_VOL can be seen in the Measures section. AVG_VOL means average volume by the desired dimension.

Image - 1.11

12. As can be seen in the below screenshot, we created a vertical bar chart giving Region-wise average Distribution Volume. Note, though in the calculated field the aggregation has been done at lower level dimension, still at view level aggregation by higher-level dimension is possible. This is owing to the INCLUDE LOD expression.

Image - 1.12

13. Sometimes, we may not be interested or mandatorily not require aggregation done by a certain dimension. In order to meet the condition, we use EXCLUDE as follows. Observe the expression in the following calculated field. EXCLUDE [Distribution Unit] ensures that aggregation by the Distribution Unit won’t work.

Image 1.13

14. The newly created field “Regional_Level_Calc” can be seen in the Measures section. The field has been named so as no aggregation is possible over the Distribution Unit dimension and Regional level analysis will be meaningful.

Image 1.14

15. Now, bring the dimensions Region and Distribution Unit into Rows region and drag the newly created field “Regional_Level_Calc” over Text in Marks card. As can be seen in the below screenshot, we get Distribution Unit wise figures by Region. However, the figures correspond to the Region level aggregation.

Image 1.15

16. The above illustration demonstrating the EXCLUDE application works similar to what FIXED does as we have seen in the preceding section. We’ll include another dimension in the analysis so as to check how EXCLUDE works.

Just observe the following screenshot. We have included dimension Mode into and removed dimension Region from the analysis. Now, we can find that for all Distribution Units, we have got the same Mode wise figures. Ideally, the correct result would have been mode wise figures for that particular distribution unit. However, in this case, while aggregating it takes into consideration the total distribution volume and just aggregates it by dimension Mode. So, essentially, there remains no relevance of including the dimension Distribution Unit in the analysis.

Image -1.16

Conclusion

While driving analytics, we never know what type of data aggregation we may require to perform. Typically, data preparation tasks prior to importing data into Tableau will do most of the work. However, in order to deal with unexpected aggregation requirements occurring in certain situations, the concept of LOD proves handy.

Recommended Articles

This is a guide to LOD Expressions in Tableau. Here we discuss the Introduction and How to Create LOD Expressions in Tableau along with its types. You may also look at the following articles to learn more –

  1. How to use Concatenate in Tableau?
  2. Working with Map Layers in Tableau
  3. Creating a Workbook in Tableau
  4. New Features in Tableau
  5. Steps of Custom SQL in Tableau

Tableau Training (4 Courses, 6+ Projects)

4 Online Courses

6 Hands-on Projects

39+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Tableau Tutorial
  • Functions
    • Tableau Functions
    • Tableau String Functions
    • Concatenate in Tableau
    • Rank Function in Tableau
    • Tableau Aggregate Functions
    • Tableau Date Functions
    • Window Sum Tableau
    • LOD Expressions in Tableau
    • LOOKUP Function in Tableau
    • Tableau Fixed Function
    • Tableau Count Distinct
    • Tableau Window Functions
  • Basic
    • What is Tableau
    • What is Tableau Dashboard
    • What is Tableau Server
    • Uses of Tableau
    • Tableau Versions
    • Tableau Architecture
    • Is Tableau Free
    • Tableau New Features
    • How To Install Tableau
    • How to Use Tableau?
    • Install Tableau Server
    • Tableau Commands
  • Charts
    • Tableau Charts
    • Tableau Chart Types
    • Donut Chart in Tableau
    • Funnel Chart in Tableau
    • Gantt Chart in Tableau
    • Bubble Chart in Tableau
    • Pareto Chart in Tableau
    • Sankey Chart In Tableau
    • Stacked Bar Chart in Tableau
    • Tableau Bullet Chart
    • Waterfall Chart in Tableau
    • Line Chart in Tableau
    • Heat Map in Tableau
    • Histogram in Tableau
    • CrossTab in Tableau
    • Treemap in Tableau
    • Trend Lines in Tableau
    • Tableau Reference Lines
    • Tableau Dual Axis
    • Legend in Tableau
    • Pie Chart in Tableau
    • Tableau Storyline
  • Statement
    • Tableau IF Statement
    • Case Statement in Tableau
  • Sort/Filters
    • Sorting in Tableau
    • Filters in Tableau
    • Types of Filters in Tableau
    • Tableau Action Filter
    • Context Filter in Tableau
    • Tableau Parameter Filter
    • Adding Filters in Tableau Dashboard
    • Tableau Context Filter
  • Tableau Dashboard
    • Dashboard in Tableau
    • Tableau Dashboard Creation
    • Tableau Dashboard Design
    • Tableau Workbook
  • Advanced
    • Tableau Reporting
    • Tableau Reporting Tool
    • Conditional Formatting in Tableau
    • Data Blending in Tableau
    • Parameters in Tableau
    • Tableau Data Sets
    • Tableau Drill Down
    • Tableau Dynamic Parameters
    • Tableau Table Calculation
    • Tableau Visualization
    • Tableau Joins
    • Pivot in Tableau
    • Data Visualization With Tableau
    • Forecast in Tableau
    • Map Layers in Tableau
    • Group in Tableau
    • Tableau Group by
    • Hierarchy in Tableau
    • Sets in Tableau
    • How to create a Set in Tableau
    • Tableau Order of Operations
    • Tableau User Group
    • Tableau Calculated Field
    • Custom SQL in Tableau
  • Interview Questions
    • Tableau Interview Questions

Related Courses

Tableau Certification Course

Business Intelligence Courses

Data Visualization Courses

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - Tableau Training (4 Courses, 6+ Projects) Learn More