Model changes as signed contributions, and keep subtotals distinct from new contributions.
Waterfall charts: reconcile every step to the closing total
A bridge is an equation
A waterfall begins with an opening amount, applies signed changes in a declared order, and ends with a closing amount. Every floating bar implies a cumulative level before and after its step. The diagram is useful when the question is why a total changed, but the numbers must reconcile exactly. An unexplained residual should be shown as a named residual, not hidden in the last bar. The aggregation grain must stay stable: summing transaction-level changes and mixing them with account-level balances can double count.
Separate a subtotal from a change
A subtotal displays the running balance at a checkpoint; it does not add to that balance again. A renderer may call an item relative, absolute or total, but the source data should declare its semantic role independently of the library. Recalculate every subtotal from the opening amount and preceding changes. If a reported checkpoint disagrees, stop the publication pipeline or show the discrepancy explicitly. The export contract should keep item role, signed amount, running level and source period.
Choose order without inventing causality
Steps may be ordered by business process, chronology or contribution magnitude. A magnitude order helps show large drivers but can imply a process order that never occurred; label it as a decomposition rather than an event timeline. If two drivers overlap, their estimated contributions may not be independently additive. State the allocation rule before drawing. Annotations and causal claims require more evidence than a visually convenient bridge. For an exact ledger, preserve source transaction IDs or reconciliation batches.
Read signed values and scale
A decrease may be good or bad depending on the metric. Use text and bar direction as well as color. A zero step should remain in the export but can be collapsed in a crowded display if the omission is stated. If the starting balance is negative, make zero visible and verify connectors still show the true running level. Signed comparison charts are better when the task is ranking independent gaps rather than explaining one total. Test refunds, reversals, missing steps and rounding before release.
Worked contract
from decimal import Decimal
def reconcile_bridge(opening: Decimal,
steps: list[tuple[str, Decimal]],
expected_close: Decimal) -> list[tuple[str, Decimal]]:
if len({name for name, _ in steps}) != len(steps):
raise ValueError("step names must be unique")
running = opening
levels = [("opening", running)]
for name, change in steps:
running += change
levels.append((name, running))
if running != expected_close:
raise ValueError("bridge does not reconcile")
return levels
bridge = reconcile_bridge(
Decimal("810.00"),
[("new contracts", Decimal("147.00")),
("returns", Decimal("-59.00")),
("credits", Decimal("-81.00"))],
Decimal("817.00"))
assert bridge[-1] == ("credits", Decimal("817.00"))Performance and operating cost
For S changes, reconciliation is O(S) time and O(S) output space. The currency example uses Decimal so binary floating-point rounding does not create a false residual. The code validates the exact closing balance but does not check whether step categories overlap or whether source ledger rows were omitted; those are upstream accounting controls. A large waterfall often needs grouped minor steps, with an auditable rollup behind the group.
Common Mistakes
- Adding a subtotal as though it were another contribution.
- Forcing the final bar to the reported close despite a residual.
- Mixing time periods or grains in one bridge.
- Using color alone to identify increase and decrease.
Validation drill
Explain a move from 810 to 817 units with three signed steps. Then remove the credit step and verify reconciliation fails. Add a subtotal after returns without changing the closing amount.
Read next
- Aggregation grain and denominator: make every plotted mark auditable
- Chart exports: carry the data, filters and render contract together
- Chart annotations: align events to the right clock without claiming causality
- Diverging bars: put signed differences on one shared zero
