🚀 New batches open: Advanced Excel • Power BI • SQL • AI for Analytics — Book a free demo

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

Tableau returns Null, not an error Unlike Excel, dividing by zero here gives Null and the cell simply goes blank. That is safer - one bad row does not break the visual - but it is also quieter, so a blank patch in a dashboard is worth investigating rather than ignoring.

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

Growth percentages do not aggregate The Grand Total row recomputes growth across everything, which is meaningful here. But if one region had no 2024 sales, its growth would be Null or infinite, and any attempt to average the growth column would be nonsense. Percentages belong per row; totals need recomputing from the underlying numbers.

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

  1. Build a profit ratio broken down by Region.
  2. Write a safe division that returns 0 instead of Null.
  3. Work out each Category share of total profit.
  4. Build a status flag using a profit ratio threshold of 0.30.
  5. Explain why a growth percentage cannot simply be averaged.