Tableau, a powerful data visualization tool, offers a variety of features that empower users to gain insights from their data. One such feature is Level of Detail (LOD) expressions. In which allow users to perform calculations at different levels of granularity within their dataset. LOD expressions come in three types: FIXED, INCLUDE, and EXCLUDE. In this blog post, we will explore these three expression types. Then discuss the situations in which they are best employed, accompanied by illustrative examples.

FIXED LOD Expressions:

FIXED LOD expressions are used to create a calculated field that aggregates data using a specific set of dimensions. This allows users to isolate specific dimensions for the calculation while keeping other dimensions unaffected. FIXED expressions provide a consistent scope of aggregation, irrespective of the view’s dimensions. They are useful when you want to perform calculations based on a specific subset of data. Without being influenced by the view’s filters.

Example: Let’s say we have a sales dataset with dimensions like Category, Region, and Date. You want to calculate the average sales for each Category, irrespective of the filters applied to Region and Date. A FIXED LOD expression would be used to accomplish this, providing an unchanging context for the calculation. Notice how the filter do not apply.

INCLUDE LOD Expressions:

INCLUDE LOD expressions are employed to calculate values considering a specified dimension or set of dimensions in addition to the dimensions in the view. These expressions help you create calculations that involve a dynamic combination of dimensions. By adjusting the calculation based on the current view’s dimensions.

Example: Imagine you’re analyzing sales data. And you want to find the sum of sales for each Category while being averaged across the Regions. In this case, an INCLUDE LOD expression would allow you to include the Category dimension dynamically. Adapting the calculation as the Category dimension changes. So in the example below, we see both the average sales values across the different Regions. And see the sales total per category averaged per Region. We can see the filters working as well.

EXCLUDE LOD Expressions:

EXCLUDE LOD expressions work by excluding a specific dimension or set of dimensions from the calculation. While still considering the other dimensions present in the view. These expressions are helpful when you want to calculate values without the influence of certain dimensions.

Example: Suppose you’re analyzing customer data and need to show the sum of sales per each product the Customer bought, but also display the total sales value per Customer, while having the detail of the Product Name on the visualization. You can use an EXCLUDE expression to exclude the Products from the calculation. As supposed to the FIXED example, the dimension quick filters will work for this calculation.

Choosing the Right Expression for the Job:

Selecting the appropriate LOD expression depends on the analytical context and the calculation requirements. Here’s a quick guide:

  • FIXED: Use when you need to isolate specific dimensions for calculations, regardless of the view’s dimensions or filters.
  • INCLUDE: Use when you want to factor in additional dimensions dynamically along with the view’s dimensions. Also when you want the value of the expression to update when you add, remove or filter on fields in the view.
  • EXCLUDE: Use when you need to calculate values without the influence of particular dimensions, while still considering other dimensions in the view. Also when you want the value of the expression to update when you add, remove, or filter on fields in the view.

By mastering LOD expressions and understanding when to use FIXED, INCLUDE, and EXCLUDE, you can unlock a new level of flexibility and precision in your Tableau analyses. These expressions empower you to perform calculations that cater to your data’s intricacies and deliver more accurate insights.

In conclusion, LOD expressions are a powerful tool in the Tableau arsenal, allowing analysts and data enthusiasts to perform calculations with varying levels of granularity. Whether you’re looking to focus on specific dimensions, dynamically include dimensions, or exclude dimensions from calculations, the choice of LOD expression type will significantly impact the accuracy and relevance of your analysis. Experiment with these expressions in different scenarios to truly harness the potential of your data.

Thank you for reading this blog. Also check out our other blogs page to view more blogs on Tableau, Alteryx, and Snowflake here.

Work together with one of our consultants and maximize the effects of your data. 

Contact us, and we’ll help you right away