LOD (Level of Detail) Expressions in Tableau | Types | Examples

LOD (Level of Detail) Expressions in Tableau

In Tableau, "Level of Detail" (LOD) expressions are a powerful feature that allows you to perform calculations at different granularities within your data. With LOD expressions, you can control the level at which an aggregation or calculation takes place, regardless of the visualisation's dimensions.

17 Oct 2023
Sumi S

    Interested in the article or the service offering? Get in touch with us:


    Types of LOD Expressions in Tableau

    1. FIXED
    2. INCLUDE
    3. EXCLUDE

    There are three types of LOD expressions in Tableau:

    FIXED: The FIXED LOD expression calculates values based on specific dimensions, regardless of the dimensions present in the visualisation. It creates a virtual level of detail for the calculation. For example, {FIXED [Category]: SUM([Sales])} would calculate the total sales for each category, irrespective of other dimensions used in the visualisation.

    INCLUDE: The INCLUDE LOD expression calculates values at the specified level while incorporating the dimension(s) used in the visualisation. It allows you to aggregate data for a specific dimension while considering other dimensions in the visualisation. For example, {INCLUDE [Region]: AVG([Profit])} would calculate the average profit for each region, considering all other dimensions in the visualisation.

    EXCLUDE: The EXCLUDE LOD expression calculates values at the specified level while excluding the dimension(s) used in the visualisation. It enables you to aggregate data for a specific dimension while ignoring other dimensions in the visualisation. For example, {EXCLUDE [Product]: SUM([Revenue])} would calculate the total revenue for each product, excluding any other dimensions present.

    FIXED LOD Tableau Function

    In Tableau, the FIXED Level of Detail (LOD) is the widely used function that allows you to perform calculations using specific dimensions, irrespective of the dimensions present in the visualisation. It creates a virtual level of detail for the calculation, providing precise control over your analysis’s granularity.

    Steps to Create a FIXED Level of Detail Tableau Function

    In Tableau, the FIXED Level of Detail (LOD) function allows you to perform calculations using specific dimensions, irrespective of the dimensions present in the visualisation. It creates a virtual level of detail for the calculation, providing precise control over your analysis’s granularity.

    The steps to create the FIXED LOD function are as follows:

    • • Create a calculated field. (This can be done by clicking on the drop-down next to the “Search” bar in the dimension pane or by selecting “Analysis” and selecting “Create Calculated Field”)
    • • Type in the FIXED LOD Formula in the calculated field and drop the field into the view.
    • • We can obtain the syntax of the FIXED expressions when we search for “Aggregate” functions in the calculated field.

    Example
    The following FIXED level of detail expression computes the sum of sales per region:

    Beinex+ Tableau Offerings

    Beinex has 100 years of combined experience in Tableau and is led by professionals who have successfully delivered Tableau projects in the region for large private and public sector organisations. Our team of Tableau-certified consultants are real-life Tableau business users passionate about Tableau and providing a world-class experience.
    In addition to providing sustainable analytics solutions, Beinex will help organisations to build superior data visual analytics capabilities internally through our bespoke training programs.

    Tags: