Tableau Course
Sales Analysis Project
This project applies calculations, table calculations, LOD expressions, filters, and dashboard design together in one end-to-end build. You will analyse a sales dataset to answer four business questions and present the findings in a single interactive dashboard.
The Dataset
Save the content below as sales_analysis.csv and connect via Text File in Tableau Desktop.
Order ID,Order Date,Ship Date,Customer Segment,Region,Category,Sub-Category,Product,Sales,Profit,Quantity,Discount
S-001,2024-01-08,2024-01-12,Consumer,East,Technology,Phones,Phone A,1820,364,2,0.0
S-002,2024-01-15,2024-01-19,Corporate,West,Furniture,Chairs,Chair B,940,94,3,0.0
S-003,2024-01-22,2024-01-25,Consumer,East,Office Supplies,Binders,Binder C,210,42,5,0.1
S-004,2024-02-03,2024-02-07,Home Office,South,Technology,Accessories,Accessory D,580,116,4,0.0
S-005,2024-02-16,2024-02-20,Consumer,West,Office Supplies,Paper,Paper E,130,39,10,0.0
S-006,2024-02-22,2024-02-25,Corporate,East,Technology,Phones,Phone F,2100,420,2,0.0
S-007,2024-03-04,2024-03-09,Consumer,Central,Furniture,Tables,Table G,1200,-60,1,0.2
S-008,2024-03-12,2024-03-16,Corporate,West,Technology,Laptops,Laptop H,3400,680,1,0.0
S-009,2024-03-20,2024-03-23,Home Office,South,Office Supplies,Labels,Label I,90,27,8,0.0
S-010,2024-04-02,2024-04-06,Consumer,East,Furniture,Chairs,Chair J,860,86,2,0.0
S-011,2024-04-09,2024-04-13,Corporate,Central,Technology,Accessories,Accessory K,470,94,3,0.1
S-012,2024-04-23,2024-04-27,Consumer,West,Office Supplies,Binders,Binder L,190,38,4,0.0
S-013,2024-05-06,2024-05-10,Corporate,East,Technology,Laptops,Laptop M,2900,580,1,0.0
S-014,2024-05-15,2024-05-19,Home Office,South,Furniture,Bookcases,Bookcase N,760,-38,2,0.2
S-015,2024-05-21,2024-05-24,Consumer,West,Technology,Phones,Phone O,1650,330,2,0.0
S-016,2024-06-03,2024-06-07,Corporate,Central,Office Supplies,Paper,Paper P,150,45,12,0.0
S-017,2024-06-11,2024-06-15,Consumer,East,Furniture,Tables,Table Q,1100,-55,1,0.2
S-018,2024-06-19,2024-06-22,Home Office,West,Technology,Accessories,Accessory R,620,124,5,0.0
S-019,2024-06-26,2024-06-29,Consumer,South,Office Supplies,Binders,Binder S,240,48,6,0.1
S-020,2024-06-30,2024-07-03,Corporate,Central,Technology,Laptops,Laptop T,3100,620,1,0.0
The Four Business Questions
Each sheet answers one specific question. Build each sheet in order before assembling the dashboard.
| Sheet | Business Question | Key Technique | Chart Type |
|---|---|---|---|
| 1. Discount Impact | Do discounts hurt profit margin? | Scatter plot + trend line | Scatter |
| 2. Segment Performance | Which customer segment is most profitable? | FIXED LOD — % of total profit | Horizontal bar |
| 3. Running Total | How does cumulative sales build through the year? | Quick Table Calculation — Running Total | Area chart |
| 4. Ship Lag | How many days between order and shipment per region? | DATEDIFF calculated field | Box plot |
Step 1 — Connect and Prepare
sales_analysis.csv. Verify: Order Date and Ship Date as Date, Sales/Profit/Quantity/Discount as Number (decimal), all text columns as String.SUM([Profit]) / SUM([Sales])
DATEDIFF('day', [Order Date], [Ship Date])
Step 2 — Sheet 1: Discount Impact
This scatter plot tests whether higher discounts correlate with lower profit margins — a common sales analysis question.
Step 3 — Sheet 2: Segment Performance
This sheet uses a FIXED LOD to calculate each segment's share of total profit — a percentage that stays correct even when the view is filtered by Region or Category.
SUM([Profit]) / {FIXED : SUM([Profit])}
The FIXED with no dimension computes total profit across the entire dataset. Dividing each segment's SUM(Profit) by this gives the true share — independent of any view-level filters applied on the dashboard.
Step 4 — Sheet 3: Running Total
A running total shows how cumulative sales build through the year — useful for tracking progress toward an annual target.
$#,##0. Add data labels to the first (Jan) and last (Jun) marks only using Mark → Label → Min/Max.Step 5 — Sheet 4: Ship Lag
A box plot of shipping lag by region shows whether some regions are consistently slower to ship and how much variability exists.
Step 6 — Build the Analysis Dashboard
#e2e8f0 border via the Layout pane for a card appearance.The FIXED LOD on the Region Share chart is worth understanding deeply. Without it, filtering the dashboard by Category would change the denominator — each region's share would shift based on which category is selected, which is misleading. The FIXED anchors the grand total to the full dataset regardless of view filters, so percentages always reflect the true company-wide share. Build this pattern once and you will reach for it constantly.
Practice Questions
1. Write the calculated field formula that computes the number of days between Order Date and Ship Date for each order.
2. Write the LOD formula for Segment % of Total Profit, and explain why a plain percentage quick table calculation gives wrong results when the view is filtered by Region.
3. The monthly Sales chart needs to show a cumulative running total. What are the steps to apply this without writing a new calculated field?
Quiz
1. The Discount Impact scatter plot needs one mark per order. How do you disaggregate the view to achieve this?
2. The Running Total chart uses an Area mark type instead of a Line. What visual advantage does the filled area provide for a cumulative trend?
3. The Discount Impact scatter plot has Category on the Colour shelf but needs a single trend line across all categories. How is this configured?
Next up — Lesson 52: Financial Analysis Project — building a profit and loss dashboard with variance calculations, budget vs actual comparisons, and waterfall charts.