0
0
Tableaubi_tool~15 mins

LOD vs table calculations in Tableau - Business Scenario Comparison

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants to understand how sales vary by product category and region, and also wants to see the percentage contribution of each product to its category's total sales.
📊 Data: You have sales data with columns: Date, Region, Product Category, Product Name, and Sales Amount.
🎯 Deliverable: Create a Tableau dashboard showing total sales by product category and region, and a table calculation showing each product's percentage of its category's sales.
Progress0 / 7 steps
Sample Data
DateRegionProduct CategoryProduct NameSales Amount
2024-01-05NorthElectronicsSmartphone5000
2024-01-10NorthElectronicsLaptop7000
2024-01-15SouthElectronicsSmartphone3000
2024-01-20SouthFurnitureDesk2000
2024-01-25EastFurnitureChair1500
2024-01-30EastFurnitureDesk2500
2024-02-05WestElectronicsLaptop4000
2024-02-10WestFurnitureChair1000
2024-02-15NorthFurnitureDesk3000
2024-02-20SouthElectronicsLaptop3500
1
Step 1: Connect the sales data to Tableau and create a new worksheet.
Load the data source with columns: Date, Region, Product Category, Product Name, Sales Amount.
Expected Result
Data is available in Tableau for analysis.
2
Step 2: Create a view showing total sales by Product Category and Region.
Drag 'Product Category' to Rows, 'Region' to Columns, and SUM(Sales Amount) to Text on Marks card.
Expected Result
A table showing total sales for each product category in each region.
3
Step 3: Create a Level of Detail (LOD) calculation to find total sales per Product Category across all regions.
{FIXED [Product Category]: SUM([Sales Amount])}
Expected Result
A new field that shows total sales per product category regardless of region.
4
Step 4: Add the LOD calculation to the view to compare category totals with regional sales.
Drag the LOD calculation to Detail or Tooltip on Marks card.
Expected Result
Tooltip shows total sales per product category for all regions.
5
Step 5: Create a table calculation to find each product's percentage contribution to its product category's sales within the current view.
Create a calculated field: SUM([Sales Amount]) / TOTAL(SUM([Sales Amount])) with addressing set to Product Name and partitioning by Product Category.
Expected Result
A percentage value showing each product's share of its category's sales.
6
Step 6: Add Product Name to Rows and the percentage calculation to Text to show product-level contribution.
Drag 'Product Name' to Rows below Product Category, drag percentage calculation to Text on Marks card, format as percentage.
Expected Result
A detailed table showing each product's sales and its percentage of the category total.
7
Step 7: Build a dashboard combining the category-region sales view and the product percentage contribution table.
Create a new dashboard, add both worksheets, arrange for clear comparison.
Expected Result
Dashboard shows total sales by category and region, plus product contribution percentages.
Final Result
--------------------------------------------------
| Product Category | North | South | East | West |
|------------------|-------|-------|------|------|
| Electronics      | 12000 | 6500  |      | 4000 |
| Furniture        | 3000  | 2000  | 4000 | 1000 |
--------------------------------------------------

Product Contribution (% of Category Sales):
Electronics:
- Smartphone: 36%
- Laptop: 64%

Furniture:
- Desk: 75%
- Chair: 25%
Electronics sales are highest in the North region.
Laptop sales contribute more than half of Electronics category sales.
Desk is the main product driving Furniture sales.
Table calculations help show product contribution within categories dynamically.
LOD expressions provide fixed category totals regardless of region filters.
Bonus Challenge

Create a parameter to let users select a region and dynamically update the product contribution percentages for that region only.

Show Hint
Use a parameter for region selection and modify the LOD calculation to include the selected region filter.