Tableau Course
Financial Analysis Project
Financial dashboards answer a different kind of question than sales dashboards — they track variance, cumulative totals, and budget adherence over time. This project builds a P&L dashboard with a waterfall chart, running totals, budget vs actuals, and variance analysis using one dataset and six calculated fields.
The Dataset
A 28-row monthly P&L table covering January through December across four cost categories plus revenue. Save as financials.csv.
Month,Month_Num,Line_Item,Type,Actual,Budget
Jan,1,Revenue,Income,142000,135000
Jan,1,Cost of Goods,Expense,58000,55000
Jan,1,Salaries,Expense,32000,32000
Jan,1,Marketing,Expense,12000,14000
Feb,2,Revenue,Income,155000,140000
Feb,2,Cost of Goods,Expense,63000,58000
Feb,2,Salaries,Expense,32000,32000
Feb,2,Marketing,Expense,14000,14000
Mar,3,Revenue,Income,168000,145000
Mar,3,Cost of Goods,Expense,69000,60000
Mar,3,Salaries,Expense,33000,32000
Mar,3,Marketing,Expense,15000,14000
Apr,4,Revenue,Income,161000,150000
Apr,4,Cost of Goods,Expense,66000,62000
Apr,4,Salaries,Expense,33000,33000
Apr,4,Marketing,Expense,13000,15000
May,5,Revenue,Income,174000,155000
May,5,Cost of Goods,Expense,71000,64000
May,5,Salaries,Expense,34000,33000
May,5,Marketing,Expense,16000,15000
Jun,6,Revenue,Income,183000,160000
Jun,6,Cost of Goods,Expense,75000,66000
Jun,6,Salaries,Expense,34000,33000
Jun,6,Marketing,Expense,17000,16000
Jul,7,Revenue,Income,178000,165000
Jul,7,Cost of Goods,Expense,73000,68000
Jul,7,Salaries,Expense,35000,34000
Jul,7,Marketing,Expense,15000,16000
The Five Business Questions
| # | Business Question | Technique | Chart |
|---|---|---|---|
| Q1 | How does monthly net profit build up from revenue to expenses? | Waterfall chart (Gantt bars) | Waterfall |
| Q2 | Is cumulative revenue tracking ahead of or behind budget? | Running total (table calculation) | Dual-axis area + line |
| Q3 | Which months are over or under budget — and by how much? | Variance calc + diverging colours | Bullet bar with reference line |
| Q4 | How does each expense line compare to budget as a percentage? | Variance % calc + highlight table | Highlight table |
| Q5 | What is the gross margin trend across months? | Gross Margin % (LOD + basic calc) | Line chart with reference band |
Step 1 — Connect and Prepare
financials.csv. Verify types: Month_Num as Number (whole), Actual and Budget as Number (decimal), all others as String.Step 2 — Build the Calculated Fields
IF [Type] = "Income" THEN [Actual]
ELSEIF [Type] = "Expense" THEN -[Actual]
END
SUM([Actual]) - SUM([Budget])
(SUM([Actual]) - SUM([Budget])) / SUM([Budget])
{FIXED [Month] : SUM(IF [Line_Item] = "Revenue" THEN [Actual] END)}
{FIXED [Month] : SUM(IF [Line_Item] = "Cost of Goods" THEN [Actual] END)}
([Revenue Only] - [COGS Only]) / [Revenue Only]
Set default formats now: Budget Variance → Currency $#,##0;-$#,##0. Budget Variance % → Percentage 1dp. Gross Margin % → Percentage 1dp.
Step 3 — Chart 1: Waterfall Chart (Q1)
A waterfall chart in Tableau uses Gantt bars with a running total table calculation to position each bar where the previous one ended. It shows how each line item contributes positively or negatively to the final total.
$#,##0. Title: January: $40K Net Profit After All Costs. Tab: Waterfall.Step 4 — Chart 2: Cumulative Revenue vs Budget (Q2)
$#,##0,,\M (abbreviated millions). Title: Cumulative Revenue Tracking $118K Ahead of Budget. Tab: Cumulative Revenue.Step 5 — Chart 3: Monthly Budget Variance (Q3)
Step 6 — Chart 4: Expense Variance Highlight Table (Q4)
Step 7 — Chart 5: Gross Margin Trend (Q5)
Step 8 — Assemble the Dashboard
The waterfall chart is the single most useful financial visualisation in Tableau, and the trickiest to build because it requires two separate table calculations — one on the Rows shelf (running total to set the bar's starting position) and one on the Size shelf (the bar height). Getting the direction right is the common stumbling block: expenses must be negative in the Net Profit field, otherwise the running total stacks them upward instead of downward from the revenue bar. Sort the Line_Item column manually — Revenue first, then expenses in order of size — so the waterfall reads logically from left to right.
Practice Questions
1. The waterfall chart uses two separate table calculations — one on Rows and one on Size. What does each one control, and why are both needed?
2. The Month field is a string so Tableau sorts it alphabetically by default. How do you make it sort chronologically from January to July?
3. Gross Margin % uses two FIXED LODs to extract Revenue and COGS values. Why is this necessary instead of simply writing SUM(Revenue) / SUM(Revenue) - SUM(COGS) directly?
Quiz
1. Which mark type and shelf combination creates a waterfall chart in Tableau?
2. Chart 2 shows cumulative revenue vs cumulative budget. Why must the view be filtered to Line_Item = Revenue before applying the Running Total table calculation?
3. The Gross Margin Trend chart uses a reference band between 55% and 60% to show the target corridor. How is a reference band added in Tableau and what visual advantage does it have over a single reference line?
Next up — Lesson 53: HR Analysis Project — building a workforce dashboard covering headcount trends, attrition analysis, salary distribution, and department-level performance comparisons.