Tableau Course
Retail Analysis Project
Retail dashboards track product performance, store comparisons, seasonal patterns, and customer basket behaviour. This project builds a complete retail analytics dashboard from a single transactions table — covering five business questions with seven calculated fields and five views assembled into one interactive dashboard.
The Dataset
A 32-row transactions table spanning two seasons across three stores and four product categories. Save as retail_data.csv.
Txn_ID,Store,Season,Category,Product,Units_Sold,Revenue,Cost,Discount_Pct
T001,North,Spring,Apparel,Jackets,42,8820,5040,0.05
T002,North,Spring,Footwear,Trainers,38,7600,4560,0.10
T003,North,Spring,Accessories,Bags,61,3660,1830,0.00
T004,North,Spring,Electronics,Headphones,29,8700,5510,0.05
T005,South,Spring,Apparel,Jackets,35,7350,4200,0.05
T006,South,Spring,Footwear,Trainers,44,8800,5280,0.10
T007,South,Spring,Accessories,Bags,72,4320,2160,0.00
T008,South,Spring,Electronics,Headphones,31,9300,5890,0.05
T009,Central,Spring,Apparel,Jackets,28,5880,3360,0.05
T010,Central,Spring,Footwear,Trainers,33,6600,3960,0.10
T011,Central,Spring,Accessories,Bags,55,3300,1650,0.00
T012,Central,Spring,Electronics,Headphones,22,6600,4180,0.05
T013,North,Summer,Apparel,T-Shirts,88,6160,3520,0.00
T014,North,Summer,Footwear,Sandals,74,5920,3552,0.10
T015,North,Summer,Accessories,Sunglasses,95,9500,4750,0.00
T016,North,Summer,Electronics,Speakers,41,12300,7380,0.05
T017,South,Summer,Apparel,T-Shirts,102,7140,4080,0.00
T018,South,Summer,Footwear,Sandals,89,7120,4272,0.10
T019,South,Summer,Accessories,Sunglasses,110,11000,5500,0.00
T020,South,Summer,Electronics,Speakers,48,14400,8640,0.05
T021,Central,Summer,Apparel,T-Shirts,76,5320,3040,0.00
T022,Central,Summer,Footwear,Sandals,62,4960,2976,0.10
T023,Central,Summer,Accessories,Sunglasses,84,8400,4200,0.00
T024,Central,Summer,Electronics,Speakers,37,11100,6660,0.05
T025,North,Autumn,Apparel,Coats,55,16500,9900,0.00
T026,North,Autumn,Footwear,Boots,48,14400,8640,0.05
T027,South,Autumn,Apparel,Coats,61,18300,10980,0.00
T028,South,Autumn,Footwear,Boots,52,15600,9360,0.05
T029,Central,Autumn,Apparel,Coats,44,13200,7920,0.00
T030,Central,Autumn,Footwear,Boots,39,11700,7020,0.05
T031,North,Autumn,Accessories,Scarves,68,6800,3400,0.00
T032,South,Autumn,Accessories,Scarves,73,7300,3650,0.00
The Five Business Questions
| # | Business Question | Technique | Chart |
|---|---|---|---|
| Q1 | Which categories and stores drive the most revenue? | Revenue by Store + Category (stacked bar) | Stacked bar chart |
| Q2 | How does profit margin compare across categories? | Gross Margin % (basic calc) | Horizontal bar with reference line |
| Q3 | How does revenue shift across seasons? | Season as dimension + % of Total (FIXED LOD) | Area chart |
| Q4 | Which products have the highest revenue per unit? | Revenue per Unit + Units Sold on Size | Scatter plot |
| Q5 | Does discounting hurt margin — and which store discounts most? | Avg Discount % + Margin by Store (FIXED LOD) | Dual-axis combo |
Step 1 — Connect and Prepare
retail_data.csv. Verify types: Units_Sold, Revenue, Cost as Number (decimal), Discount_Pct as Number (decimal), all others as String.Step 2 — Build the Calculated Fields
SUM([Revenue]) - SUM([Cost])
(SUM([Revenue]) - SUM([Cost])) / SUM([Revenue])
SUM([Revenue]) / SUM([Units_Sold])
SUM([Revenue]) / {FIXED : SUM([Revenue])}
{FIXED [Store] : AVG([Discount_Pct])}
{FIXED [Store] :
(SUM([Revenue]) - SUM([Cost])) / SUM([Revenue])
}
IF [Discount_Pct] > 0.05 THEN "Heavy Discount"
ELSEIF [Discount_Pct] > 0 THEN "Light Discount"
ELSE "No Discount"
END
Set default formats: Gross Margin % → Percentage 1dp. Revenue per Unit → Currency $#,##0. % of Total Revenue → Percentage 1dp. Avg Discount by Store → Percentage 1dp.
Step 3 — Chart 1: Revenue by Store and Category (Q1)
$#,##0,\K. Title: South Leads in Revenue — Electronics and Apparel Drive All Three Stores. Tab: Revenue by Store.Step 4 — Chart 2: Gross Margin by Category (Q2)
Step 5 — Chart 3: Revenue Share by Season (Q3)
$#,##0,\K.Step 6 — Chart 4: Revenue per Unit Scatter Plot (Q4)
$#,##0. Format y-axis as Percentage 0dp. Title: Coats: Highest Revenue per Unit — Sunglasses: Best Margin at High Volume. Tab: Product Performance.Step 7 — Chart 5: Discount vs Margin by Store (Q5)
Step 8 — Assemble the Dashboard
The Discount vs Margin chart is a classic management chart — it answers whether the discounting strategy is actually hurting the business. The dual-axis approach is perfect here because discount rate and margin rate are both percentages on similar scales, so synchronising the axes makes the comparison honest. If you find all three stores have similar margins despite different discount levels, the story is that discounting is being absorbed by volume gains rather than margin erosion — a reassuring finding for the sales team but worth watching in future seasons.
Practice Questions
1. The Season field is a string, so Tableau sorts it alphabetically by default. How do you force it into chronological order, and what goes wrong on the area chart if you skip this step?
2. The Discount Impact Flag field classifies each transaction into three tiers. How is it built and what does it reveal on the scatter plot?
3. Chart 5 uses Margin by Store (FIXED LOD) rather than the plain Gross Margin % calculated field. Why does this matter when a Category filter is applied on the dashboard?
Quiz
1. The product scatter plot encodes three variables at once. Which shelf carries the third variable — units sold — and what does it show?
2. The % of Total Revenue field uses a FIXED LOD with an empty dimension. What does the empty FIXED return and why is this the correct denominator for a season share calculation?
3. Chart 5 overlays a margin line on top of discount bars for the same three stores. What is the exact sequence of steps in Tableau to achieve this combined chart?
Next up — Lesson 55: Marketing Analysis Project — building a campaign performance dashboard covering channel attribution, conversion funnels, cost per acquisition, and ROI comparisons across marketing spend.