0
0
Tableaubi_tool~15 mins

INCLUDE LOD expression in Tableau - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants to see the average sales per product category within each region, even if some products have few sales records. This helps understand category performance in each region more clearly.
📊 Data: You have sales data with columns: Region, Product Category, Product Name, and Sales Amount. Each row is a sale of a product.
🎯 Deliverable: Create a Tableau dashboard showing average sales per product category by region using an INCLUDE LOD expression.
Progress0 / 5 steps
Sample Data
RegionProduct CategoryProduct NameSales Amount
NorthElectronicsSmartphone500
NorthElectronicsLaptop1200
NorthFurnitureDesk300
SouthElectronicsSmartphone700
SouthFurnitureChair150
SouthFurnitureDesk400
EastElectronicsTablet350
EastFurnitureChair200
EastFurnitureDesk450
WestElectronicsLaptop1100
WestFurnitureDesk500
WestFurnitureChair250
1
Step 1: Connect your sales data to Tableau and load it into the workspace.
No formula needed; just import the data.
Expected Result
Data table with columns Region, Product Category, Product Name, Sales Amount is available in Tableau.
2
Step 2: Create a calculated field to compute average sales per product within each category and region using INCLUDE LOD expression.
Name: Avg Sales per Product Formula: {INCLUDE [Product Name] : AVG([Sales Amount])}
Expected Result
A new calculated field 'Avg Sales per Product' that calculates average sales per product considering product name granularity.
3
Step 3: Build a view with Rows as Region, Columns as Product Category, and Values as the average of 'Avg Sales per Product'.
Drag Region to Rows, Product Category to Columns, and drag 'Avg Sales per Product' to Text or Label, then set aggregation to AVG.
Expected Result
A table showing average sales per product category for each region.
4
Step 4: Format the view to improve readability: add color shading to highlight higher average sales.
Use Color Marks card with a gradient from light to dark based on average sales values.
Expected Result
The table visually highlights categories with higher average sales in each region.
5
Step 5: Create a dashboard and add the view with filters for Region and Product Category for interactivity.
Add filter controls for Region and Product Category to the dashboard.
Expected Result
Interactive dashboard allowing manager to explore average sales per category by region.
Final Result
Dashboard: Average Sales per Product Category by Region

+---------+--------------+--------------+
| Region  | Electronics  | Furniture    |
+---------+--------------+--------------+
| North   | 850          | 300          |
| South   | 700          | 275          |
| East    | 350          | 325          |
| West    | 1100         | 375          |
+---------+--------------+--------------+

Color shading: Darker cells mean higher average sales.
West region has the highest average sales in Electronics category (1100).
Furniture category average sales are fairly consistent across regions, around 300-375.
North region shows strong Electronics sales driven by Laptop and Smartphone.
INCLUDE LOD expression helps capture average sales per product even when data is aggregated by category and region.
Bonus Challenge

Modify the dashboard to also show total sales per region alongside average sales per category using a combined view.

Show Hint
Create another calculated field for total sales per region using FIXED LOD expression: {FIXED [Region] : SUM([Sales Amount])} and add it to the dashboard.