Bird
Raised Fist0
Tableaubi_tool~20 mins

INCLUDE LOD expression in Tableau - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
INCLUDE LOD Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ dax_lod_result
intermediate
2:00remaining
Calculate Average Sales per Customer Including Region

You have sales data with Customer and Region fields. You want to calculate the average sales per customer but include Region in the calculation using an INCLUDE LOD expression.

Which of the following Tableau calculations correctly uses INCLUDE LOD to achieve this?

A{ INCLUDE [Region] : AVG([Sales]) }
B{ INCLUDE [Customer] : SUM([Sales]) }
C{ EXCLUDE [Region] : AVG([Sales]) }
D{ FIXED [Customer] : AVG([Sales]) }
Attempts:
2 left
💡 Hint

INCLUDE LOD adds dimensions to the view for aggregation.

❓ visualization
intermediate
2:00remaining
Best Visualization for INCLUDE LOD Showing Sales by Customer and Region

You created an INCLUDE LOD calculation to get average sales per customer including region. Which visualization best shows this data clearly?

AA bar chart with Customer on the x-axis and average sales on the y-axis, colored by Region
BA pie chart showing total sales by Region only
CA line chart showing sales over time without region breakdown
DA scatter plot with sales on x-axis and customer count on y-axis
Attempts:
2 left
💡 Hint

Think about showing both Customer and Region dimensions clearly.

🧠 Conceptual
advanced
2:00remaining
Understanding INCLUDE LOD Behavior

Which statement best describes how INCLUDE LOD expressions behave in Tableau?

AINCLUDE LOD removes specified dimensions from the view level of detail for aggregation.
BINCLUDE LOD adds specified dimensions to the view level of detail for aggregation, even if they are not in the view.
CINCLUDE LOD fixes the aggregation at the specified dimensions regardless of the view.
DINCLUDE LOD ignores all dimensions and calculates aggregation at the data source level.
Attempts:
2 left
💡 Hint

Think about what INCLUDE means in terms of dimensions.

🔧 Formula Fix
advanced
2:00remaining
Identify the Error in INCLUDE LOD Expression

Review the following Tableau INCLUDE LOD expression:

{ INCLUDE [Region] AVG([Sales]) }

What is the error in this expression?

Tableau
{ INCLUDE [Region] AVG([Sales]) }
ABraces '{}' should be parentheses '()'
BIncorrect use of square brackets around Region
CAVG function cannot be used inside INCLUDE LOD
DMissing colon ':' between dimension and aggregation
Attempts:
2 left
💡 Hint

Check the syntax for INCLUDE LOD expressions carefully.

🎯 Scenario
expert
3:00remaining
Using INCLUDE LOD to Compare Sales with and without Region

You want to create a dashboard that compares average sales per customer including region and average sales per customer ignoring region. Which two LOD expressions should you use?

A{ FIXED [Region] : AVG([Sales]) } and { EXCLUDE [Customer] : AVG([Sales]) }
B{ EXCLUDE [Region] : AVG([Sales]) } and { INCLUDE [Customer] : AVG([Sales]) }
C{ INCLUDE [Region] : AVG([Sales]) } and { FIXED [Customer] : AVG([Sales]) }
D{ FIXED [Customer, Region] : AVG([Sales]) } and { INCLUDE [Customer] : AVG([Sales]) }
Attempts:
2 left
💡 Hint

Think about how FIXED and INCLUDE control aggregation levels.

Practice

(1/5)
1. What does the INCLUDE LOD expression do in Tableau?
easy
A. Changes the data source connection
B. Removes all filters from the calculation
C. Aggregates data only at the highest level of detail
D. Calculates a measure at a more detailed level than the current view

Solution

  1. Step 1: Understand the purpose of INCLUDE LOD

    INCLUDE LOD lets you add extra detail to calculations without changing the main view's level of detail.
  2. Step 2: Compare options to definition

    Calculates a measure at a more detailed level than the current view correctly states it calculates measures at a more detailed level than the current view, which matches the INCLUDE LOD purpose.
  3. Final Answer:

    Calculates a measure at a more detailed level than the current view -> Option D
  4. Quick Check:

    INCLUDE LOD = More detailed calculation [OK]
Hint: INCLUDE adds detail inside calculation without changing view [OK]
Common Mistakes:
  • Confusing INCLUDE with EXCLUDE or FIXED LOD
  • Thinking it removes filters
  • Assuming it changes data source
2. Which of the following is the correct syntax for an INCLUDE LOD expression to calculate average sales per customer in Tableau?
easy
A. { INCLUDE [Customer ID] : AVG([Sales]) }
B. { EXCLUDE [Customer ID] : AVG([Sales]) }
C. INCLUDE [Customer ID] AVG([Sales])
D. { FIXED [Customer ID] AVG([Sales]) }

Solution

  1. Step 1: Recall correct INCLUDE LOD syntax

    The correct syntax uses curly braces, INCLUDE keyword, dimension in brackets, colon, then aggregation function.
  2. Step 2: Check each option

    { INCLUDE [Customer ID] : AVG([Sales]) } matches syntax: { INCLUDE [Customer ID] : AVG([Sales]) }. Others have wrong keywords, missing braces, or missing colon.
  3. Final Answer:

    { INCLUDE [Customer ID] : AVG([Sales]) } -> Option A
  4. Quick Check:

    Syntax = { INCLUDE [Dimension] : Aggregation } [OK]
Hint: INCLUDE syntax always uses braces and colon [OK]
Common Mistakes:
  • Omitting curly braces or colon
  • Using wrong LOD keyword (EXCLUDE or FIXED)
  • Missing brackets around dimension
3. Given the data view shows total sales by Region, what will the following INCLUDE LOD expression calculate?
{ INCLUDE [Customer ID] : SUM([Sales]) }

Options:
medium
A. Sum of sales per customer then aggregated by region
B. Average sales per region
C. Sum of sales per region ignoring customers
D. Sum of sales ignoring region and customer

Solution

  1. Step 1: Understand the view and LOD expression

    The view is grouped by Region. The INCLUDE LOD adds Customer ID detail inside the calculation.
  2. Step 2: Interpret the calculation result

    The expression sums sales per Customer ID first, then aggregates these sums by Region in the view.
  3. Final Answer:

    Sum of sales per customer then aggregated by region -> Option A
  4. Quick Check:

    INCLUDE adds detail level inside aggregation [OK]
Hint: INCLUDE adds detail inside aggregation, then aggregates by view [OK]
Common Mistakes:
  • Thinking it ignores customers
  • Confusing sum with average
  • Assuming it ignores region
4. Identify the error in this INCLUDE LOD expression:
{ INCLUDE Customer ID : SUM([Sales]) }
medium
A. Incorrect use of curly braces
B. Missing aggregation function
C. Missing square brackets around Customer ID
D. INCLUDE keyword should be EXCLUDE

Solution

  1. Step 1: Check syntax for dimension references

    Dimension names must be enclosed in square brackets in LOD expressions.
  2. Step 2: Identify missing brackets

    Customer ID is missing square brackets, causing syntax error.
  3. Final Answer:

    Missing square brackets around Customer ID -> Option C
  4. Quick Check:

    Dimensions need [brackets] in LOD [OK]
Hint: Always put dimension names in square brackets [OK]
Common Mistakes:
  • Omitting brackets around dimensions
  • Confusing INCLUDE with EXCLUDE
  • Missing curly braces
5. You want to calculate the average sales per product category but also include the customer-level detail in the calculation without changing the view's level of detail. Which INCLUDE LOD expression should you use?
hard
A. AVG([Sales])
B. { INCLUDE [Customer ID] : AVG([Sales]) }
C. { EXCLUDE [Customer ID] : AVG([Sales]) }
D. { FIXED [Product Category] : AVG([Sales]) }

Solution

  1. Step 1: Understand the requirement

    You want average sales per product category but with customer-level detail included in calculation without changing view level.
  2. Step 2: Choose correct LOD expression

    INCLUDE adds customer detail inside calculation while keeping view level (product category). { INCLUDE [Customer ID] : AVG([Sales]) } matches this need.
  3. Final Answer:

    { INCLUDE [Customer ID] : AVG([Sales]) } -> Option B
  4. Quick Check:

    INCLUDE adds detail without changing view [OK]
Hint: Use INCLUDE to add customer detail inside product category calc [OK]
Common Mistakes:
  • Using FIXED which ignores view level
  • Using EXCLUDE which removes detail
  • Using simple AVG ignoring detail