×

Tableau LOD Expressions

LOD Expressions

LOD or Level of Detail expressions computes values at the data source and the visualization level instead of bringing all the data to the Tableau interface. However, LOD expressions give you more control on the level of granularity you want to compute. A simple example is adding dimension to an already calculated aggregate value. You can also use a LOD expression to the table. This is called a Table-Scoped LOD expression.

LOD expressions- Types

There are three types of LOD expressions that can be created in Tableau: FIXED: FIXED LOD expressions are used to compute a value using the specified dimensions, without any reference to the dimensions in the view.
{FIXED [Region] : SUM([Sales])}
INCLUDE: INCLUDE LOD expressions compute values using the specified dimensions in addition to any dimensions which are in the view. It is used to calculate at a granular level of detail in the database.
{ INCLUDE [Name] : SUM([Sales]) }
EXCLUDE: EXCLUDE LOD expressions declare dimensions to omit from the view level of detail.
{EXCLUDE [Date (Month / Year)] : AVG({FIXED [Date (Month / Year)] : SUM([Sales])})}

Create Calculated Field

1. In the Tableau Desktop, connect to the Excel file named Facebook Data which is saved in the data source.                  Tableau LOD Expressions 1 2. Navigate to the worksheet pane and click on Analysis > Create Calculated Field as shown below. Tableau LOD Expressions 2 3. You will notice that a new dialogue box has appeared.

FIXED LOD Expression

For instance, if we want to find the number of Sales for each state in each region. For this, we will use the FIXED LOD function and will create the formula as shown in the following screenshot. Also, change the name to Fixed_Regional_Sales. And click on OK. Tableau LOD Expressions 3 From the data pane, under Dimensions drag the Region, and State field to the Rows shelf and the Fixed_Regional_Sales calculated field to the Text shelf under the Marks card. Next, again drag the Region field to the Color shelf. This produces the following outlook, where we can see that the values for the individual states in each region are identical. This is because we have fixed the Region dimension for the calculation of Sales value. Tableau LOD Expressions 4

INCLUDE LOD EXPRESSION

For instance, if you want to compute the total sales per customer for the specified dimensions in addition to whatever dimensions are in the view. For this, we will use the INCLUDE LOD function and will create the formula as shown in the following screenshot. Also, change the name to Include_Sales. And click on OK. Tableau LOD Expressions 5 The above-calculated field can be applied in the view by dragging it to the column shelf. Also drag the category field to the Rows shelf. It will produce the following view which includes both the dimensions in the calculations where the values would be different for each category. Tableau LOD Expressions 6

Exclude LOD Expression

EXCLUDE LOD expressions specify dimensions to exclude from the view level of detail. For example you want to calculate the Sales figure for every month. For this, we will create the formula as shown in the following screenshot. Also, change the name to Exclude_Region. And click on OK. Tableau LOD Expressions 7 Drag the above-calculated field and direction field to the columns shelf. Also, drag the year field and drop it under the rows field. You will have the following screenshot: Tableau LOD Expressions 8

Related Topics

Tableau Products Comparison

Tableau Products Explained In this tutorial, you will have a look at an overview of the products offered by the tableau: Tableau Desktop So we have a tableau desktop, which is where...

1 minute read.

Tableau Gantt Chart

How to create a Gantt Chart in Tableau A Gantt chart is a type of chart that shows the development and duration of the event or resource over a period of...

2 minutes read.

Tableau Opening Page

Let’s have a look at the content of the tableau opening page: Step: 1 On your left you have the different things and you can connect to it. This is more...

1 minute read.

Tableau Motion Chart

Motion charts are a type of chart that allows you to visualize in action displaying the changes of your data over time by indicating the movement of data points within...

2 minutes read.

Tableau Pie Chart

A pie chart is a type of graph in which a circle is divided into sectors to represent the data with different sizes and colors. In Tableau, the slices of...

1 minute read.

Tableau Bullet Chart

How to Create Tableau Bullet Chart? A bullet chart is a type of chart that is used to compare the value of one measure with another measure. It is a variation...

2 minutes read.

Tableau Data Types

Data Types in Tableau Tableau is a fastest growing and powerful data visualization tool which is primarily used in the Business Intelligence. Since every tool stores its data into some memory...

2 minutes read.

Tableau Dimensions and Measures

How to Use Tableau Dimensions and Measures? Tableau is very built on the premises of drag and drops so let’s developed a simple visualization and talk about what each of these...

3 minutes read.

Tableau Quick Filters

Tableau Filters help to have enough functionality to solve most of the common filtering needs. Quick filters are simply a filter that has been exposed in a view. But, it...

2 minutes read.

Tableau Bar Chart

How to Create Tableau Bar Chart? In Tableau, different kinds of bar charts can be produced by using dimensions and measures. A bar chart represents your data in rectangular bars with the...

2 minutes read.

Tableau Scatter Plot

Tableau Scatter plot with Dimensions The scatter plot represents the data in which many points are scattered in the Cartesian plane according to the given figures. It is generated by plotting...

2 minutes read.

Tableau Bubble Chart

How to Create Tableau Bubble Chart? A bubble chart is a kind of chart that displays the three dimensions of data as a cluster of circles. It is considered as a...

2 minutes read.

Tableau Visualization

Data Visualization Using Tableau In this chapter, we will learn about visualization. We will come across and click the ‘Sheet’ which is where you start to build our visualization. Let’s take a look...

5 minutes read.

Tableau Data Terminology

Learn Tableau Data Terminology Tableau Tool drives a lot of visualizations. It is one of the dominant components for Data Analysis. It has many exclusive terms and descriptions. One needs to get...

4 minutes read.

Tableau Waterfall Chart

How to Create Tableau Waterfall Chart? The waterfall chart is a type of chart that effectively displays how an initial value is incremented and decremented by a series of intermediate values,...

2 minutes read.

How to download and install tableau setup for free?

Tableau Environmental setup In this section, we will learn how to download and install tableau for free. After downloading tableau setup, the installation is a very easy process. The following steps and screenshots...

1 minute read.

Tableau Filter Introduction

Filtering is an essential aspect of analyzing data. It is the process of eliminating values from a range of result set. Tableau provides a filtering feature to filter data from...

2 minutes read.

Tableau Connectivity with Excel

Connect Excel to Tableau server Step by Step Let’s get started by connecting tableau to a data source:   Step: 1 Click on Microsoft Excel   Step: 2 Choose your excel file and open it...

1 minute read.

Tableau Operator

Operator in Tableau An operator is referred to as a symbol that often tells the compiler to execute certain mathematical or logical operations. Tableau accepts the same operators which are used...

4 minutes read.

Tableau Box Plot

How to Create Tableau Box Plot? The box plot is the type of chart that shows the distribution of values along an axis. It is also known as a box-and-whisker plot....

2 minutes read.