Day 8 — Ratios, KPIs and safe division
The measures a manager actually asks for, and the traps in each one.
Profit ratio
Every calculation on this page runs against the Orders data source below - 48 rows, dimensions in blue, measures in green, exactly as Tableau colours them.
Accessories run at a much healthier ratio than Technology, but produce far less profit in absolute terms. A dashboard showing only one of those two columns tells half the story.
Division by zero
Contribution to total
Compare the last two columns per region. A region contributing more profit than sales is punching above its weight - that gap is the insight, not either number alone.
Year-on-year growth
2025 grew 36.2% on 2024. Written out in full it is unwieldy - in real Tableau you would define Sales 2024 and Sales 2025 as their own fields and write ([Sales 2025] - [Sales 2024]) / [Sales 2024].
Growth by region
A KPI flag
Notice the IF wraps SUM([Sales]), not [Sales]. A KPI compares a group total against a target, so every field in it must be aggregated.
Try these yourself
- Build a profit ratio broken down by Region.
- Write a safe division that returns 0 instead of Null.
- Work out each Category share of total profit.
- Build a status flag using a profit ratio threshold of 0.30.
- Explain why a growth percentage cannot simply be averaged.
