0
0
Tableaubi_tool~5 mins

EXCLUDE LOD expression in Tableau - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
EXCLUDE LOD expressions let you remove certain dimensions from your view when calculating values. This helps you see data summaries without some details, like totals ignoring a category.
When you want to calculate total sales ignoring the product category but keeping other filters.
When your dashboard needs to show average sales per region, ignoring the individual stores.
When you want to compare overall performance without breaking down by month or day.
When you want to remove a dimension temporarily to see a simpler summary.
When you want to create a calculation that ignores a specific filter or grouping.
Steps
Step 1: Open
- Tableau Desktop and load your data source
Your data appears in the Data pane
Step 2: Click
- Analysis menu > Create Calculated Field
A dialog box opens to enter a new calculation
Step 3: Type
- Calculation editor
You can write your EXCLUDE LOD expression
💡 Start with curly braces { } and use EXCLUDE keyword
Step 4: Enter
- Calculation editor
Example: {EXCLUDE [Category] : SUM([Sales])} calculates total sales ignoring Category
💡 Replace [Category] with the dimension you want to exclude
Step 5: Click
- OK button in the calculation editor
The new calculated field appears in the Data pane
Step 6: Drag
- New calculated field to Rows or Columns shelf
The view updates showing the calculation excluding the chosen dimension
Before vs After
Before
View shows sales broken down by Region and Category with SUM([Sales])
After
View shows sales broken down by Region only, with {EXCLUDE [Category] : SUM([Sales])} calculation ignoring Category
Settings Reference
Calculation editor
📍 Analysis menu > Create Calculated Field
To create custom calculations like EXCLUDE LOD expressions
Default: Empty
Data pane
📍 Left side panel in Tableau Desktop
To organize and access fields for building views and calculations
Default: Shows all fields from data source
Common Mistakes
Writing EXCLUDE LOD without curly braces
Tableau requires LOD expressions to be inside curly braces to work
Always write EXCLUDE expressions like {EXCLUDE [Dimension] : AGGREGATION([Measure])}
Excluding a dimension not in the view
EXCLUDE only removes dimensions present in the view; excluding others has no effect
Make sure the dimension you exclude is part of the current view or visualization
Summary
EXCLUDE LOD expressions remove specific dimensions from calculations to simplify data views.
They help create summaries ignoring certain details without changing the whole view.
Always use curly braces and ensure the excluded dimension is in the view for correct results.