Reporting on cleaned data: reconciliation, restatements and trust
TL;DR
Difficulty: Advanced
Cleaned numbers differ from the shop, the payment providers and the books because each answers a different question. Trust comes from showing why, every time.
- Publish a reconciliation bridge from a number anyone can check to the number you report, rows and value on every line, and test that it closes.
- Match payments one by one against Stripe and PayPal, agree tolerances with finance in advance, and apply them to the unexplained part, not the raw gap.
- Label provisional numbers and estimate their final value from history.
- Version every metric definition and store the version on every row.
- When a rule changes, restate or show both, never mix, split each change into its causes, and keep every published version.
What to read first
The dashboard says one thing, the shop admin another, the accountant a third. All three can be right. This chapter shows how to prove it: a reconciliation bridge for every report, checks against the money, tolerances agreed in advance, and a calm, complete restatement when a rule turns out to be wrong.
The cleaned number will never match the shop, and that is fine
You cleaned the data. You removed the test orders, fixed the time zones, took out the cancellations and the value added tax (VAT), and subtracted the refunds. The dashboard now shows a number you trust. Then the owner opens the shop's admin screen, sees a different number, and asks the question every data engineer hears sooner or later: "Why does the dashboard not match the shop?"
This chapter answers the question behind that one: how do you report on data you have changed, and keep everyone's trust while you do it? The short answer is that the cleaned number is allowed to differ from the source, the bank and the books, as long as you can show exactly why, step by step, every single time. The rest of this article is the practical how: the reconciliation bridge, the checks against the money, tolerances agreed with finance, provisional numbers, metric definitions with versions, data notes, and what to do when a rule changes and the past has to be restated.
A few terms first, so nobody is left behind. Reconciliation means comparing two numbers that should be related and explaining every difference between them. A source system is where the data was born, here the shop's database. The ledger is the bookkeeping: the accounts your accountant keeps and files from. A restatement is a published correction of a number you already reported. And a rule is one written cleaning decision, such as "orders placed by staff accounts are not customer orders", which earlier chapters turned into code.
This chapter builds directly on versioning, history and audit trails for cleaned data, which showed how to keep every version of every row. Here you put that history to work in front of the people who read your reports.
Example: four numbers for one October at Wrenfield Home
Wrenfield Home is the invented online homeware shop in Leeds that runs through this whole series (wrenfieldhome.example). Priya owns it. Callum is her developer and data engineer. The shop runs on Ruby on Rails and Solidus with PostgreSQL, and Callum loads everything into BigQuery and transforms it with dbt Core.
On 5 November 2026, Priya looks at October from four places:
| Where | What it shows for October | Number |
|---|---|---|
| Shop export (orders with a completion time in October) | Orders, total including VAT | 2,031 orders, £144,354.00 |
| Callum's dashboard | Net revenue excluding VAT, after refunds | 2,011 orders, £113,850.00 |
| Payment providers (Stripe and PayPal) | Charges for October's orders | £143,118.00 |
| Accountant's management accounts | Net sales for October | £111,700.00 |
Four numbers, almost £33,000 apart from top to bottom. Nobody has made a mistake. Each number answers a different question, and each one is correct for its own question. The work in this chapter is making that visible, so that Priya never has to take anyone's word for it.
Every number answers its own question
Before you reconcile anything, be clear about which question each number answers. Most arguments about "the right number" are really arguments about two different questions that share a name, usually "revenue".
The shop database records what happened in the checkout: every order that completed, including the ones that were later cancelled, the test orders and the staff purchases. It answers "what went through the checkout?".
The cleaned analytical view answers "how is the business doing?". It removes what is not real customer behaviour, puts every order into the right local day, and takes out tax that was never yours. It is the right base for trends, conversion rates, customer counts and marketing decisions.
The ledger answers "what does the company owe and own?". It follows accounting rules and has a legal job. It is the only right base for the statutory accounts, the VAT return and anything the tax authority or an auditor will read.
The payment providers answer "what money moved, and when?". They know nothing about your products or your customers. They know charges, refunds, fees and payouts.
Here is the line that settles most disputes: numbers that must match the ledger exactly come from the ledger. Your warehouse can reproduce them and reconcile to them, but it never replaces them. In the UK, every company must keep "adequate accounting records", which the Companies Act 2006 defines as records "sufficient to show and explain the company's transactions"1. Those records are the books, not your dashboard. This is general information, not legal advice: your accountant decides what the books need.
The cleaned view is the right base wherever the question is about behaviour or direction. Did more people buy? Did the new product page convert better? Which channel brings customers who come back? For those questions, the ledger is the wrong tool, because it mixes in staff purchases, books refunds in the month they happen rather than the month of the order, and knows nothing about sessions or channels.
Example: which number Priya uses for which decision
Priya has five recurring decisions. Callum writes down, once, which number feeds each one:
| Decision | Number to use | Why |
|---|---|---|
| How much VAT to pay this quarter | The ledger | A legal filing, the books are the record |
| Can I afford a new hire in spring | Management accounts from the ledger, plus the cash forecast | Money owed and owned, not behaviour |
| Is the new product range selling | Cleaned net revenue by product, order view | Behaviour by product, refunds attributed to the order |
| Is Google Ads worth its budget | Cleaned new customers and net revenue by channel | Customer behaviour, test and staff orders out |
| Is our return problem getting worse | Cleaned refund rate by order month, once mature | Behaviour by cohort of orders |
The table goes into the dashboard's documentation and onto the first page of the monthly report. When someone quotes the dashboard in a VAT discussion, the table settles it without a meeting.
The reconciliation bridge: from source total to reported total
The single most useful thing you can publish next to a cleaned number is a reconciliation bridge. It starts at a number anyone can check in the source system, applies every cleaning step one line at a time, counts the rows and the value each step moved, and ends exactly at the number you report. Whatever is left over gets its own line, called "unexplained", and the goal is to keep it at zero.
The idea is plain arithmetic. Written as a formula (Foundations: ratios and rates covers the notation):
Here is the reported total, is the base total from the source system, is the adjustment made by cleaning step (negative when the step removes something), is the number of steps, and is the unexplained remainder. A bridge "closes" when , or when stays inside a tolerance you agreed in advance.
Five rules make a bridge trustworthy:
- Start where anyone can check. The base must be a number the reader can reproduce without you: the shop admin's export, a query on the source database, the payment provider's report. If the starting point needs your code, the bridge proves nothing.
- Count rows and value on every line. A step that removes 3 orders worth £186 tells a different story from a step that removes 300 orders worth £186.
- One line per rule, in a fixed order. The order matters, because a row removed as a test order cannot also be removed as cancelled. Fix the order once and keep it, or months stop being comparable.
- Compute the reported number independently. The bridge's last line must be compared with the number the dashboard actually shows, calculated by the real reporting model. If you compute the reported total from the bridge itself, is zero by construction and the check is theatre.
- Publish it next to the report. Not in a folder. On the same page, or one click away.
Example: the October bridge, line by line
Here is the bridge Callum published with the October report on 5 November. The base is the shop's export of every order with a completion time in October, which filters by date in Coordinated Universal Time (UTC), because the application's time zone was left at the Rails default of UTC2.
| Step | Rows | Value | Running total |
|---|---|---|---|
| Shop export, completed in October (UTC dates), including VAT | 2,031 | £144,354.00 | £144,354.00 |
| Add orders from the first hour of 1 October UK time (stored as 30 September UTC) | 5 added | £360.00 added | £144,714.00 |
| Remove test and staff orders (rule v3) | 3 removed | £186.00 removed | £144,528.00 |
| Remove orders cancelled before dispatch | 22 removed | £1,596.00 removed | £142,932.00 |
| Remove VAT included in the prices | £23,822.00 removed | £119,110.00 | |
| Remove refunds issued by 5 November for October orders, excluding VAT | 149 orders refunded | £5,260.00 removed | £113,850.00 |
| Reported net revenue (from the reporting model) | 2,011 | £113,850.00 | |
| Unexplained | 0 | £0.00 |
Each line deserves a sentence of explanation, because the reader will ask:
- The first hour of October. In October 2026 the UK was on British Summer Time until 25 October3, one hour ahead of UTC. An order placed at 00:30 on 1 October in Leeds is stored as 23:30 on 30 September in UTC. The export missed five of them. The month's end needs no fix this year, because the clocks went back before 31 October, so UK time and UTC agree at midnight.
- Cancelled orders. In Solidus, an order can only be cancelled after it completed: the state machine moves it from the state
completeto the statecanceled4. It keeps its completion time, so any export that filters on completion time includes it. - VAT. All of Wrenfield's goods and delivery charges carry the standard rate of 20%, so the VAT inside a price is one sixth of it. £142,932.00 divided by 6 is £23,822.00.
- Refunds. Only refunds issued by the day the report was built. More will come, and a later section deals with that.
The bridge as a chart reads at a glance:
Building the bridge in dbt
Callum builds the bridge as a dbt model, so it is rebuilt with every run and cannot drift from the code that cleans the data. The model below is BigQuery SQL. It reads the staging model of Solidus orders, the table of exclusions that the business rules chapter produced (one row per excluded order with its reason and rule version), and the refunds with their VAT split. The month and the cut off date come in as dbt variables.
-- models/marts/reporting/rpt_revenue_bridge.sql (BigQuery)
{% set report_month = var('report_month') %} -- for example '2026-10-01'
{% set as_of_date = var('as_of_date') %} -- for example '2026-11-05'
with orders as (
select
order_id,
state,
total_gross, -- spree_orders.total
included_tax, -- spree_orders.included_tax_total
date(completed_at) as utc_date,
date(completed_at, 'Europe/London') as local_date
from {{ ref('stg_solidus__orders') }}
where completed_at is not null
),
in_export as ( -- what the shop export counts: UTC dates
select * from orders
where date_trunc(utc_date, month) = date '{{ report_month }}'
),
in_month as ( -- what the report counts: UK local dates
select * from orders
where date_trunc(local_date, month) = date '{{ report_month }}'
),
excluded as (
select m.*, e.exclusion_reason
from in_month m
join {{ ref('int_order_exclusions') }} e using (order_id)
),
kept as (
select m.*
from in_month m
left join excluded x using (order_id)
where x.order_id is null
and m.state != 'canceled'
),
refunds as (
select r.order_id, sum(r.refund_net) as refund_net
from {{ ref('int_order_refunds') }} r
join kept k using (order_id)
where date(r.refunded_at, 'Europe/London') <= date '{{ as_of_date }}'
group by r.order_id
),
steps as (
select 1 as step_order, 'Shop export, UTC dates, incl. VAT' as step,
count(*) as rows_delta, sum(total_gross) as value_delta
from in_export
union all
select 2, 'Local month: orders added',
count(*), sum(total_gross)
from in_month where order_id not in (select order_id from in_export)
union all
select 3, 'Local month: orders moved out',
-count(*), -coalesce(sum(total_gross), 0)
from in_export where order_id not in (select order_id from in_month)
union all
select 4, 'Test and staff orders',
-count(*), -coalesce(sum(total_gross), 0)
from excluded
union all
select 5, 'Cancelled orders',
-countif(state = 'canceled'), -coalesce(sum(if(state = 'canceled', total_gross, 0)), 0)
from in_month where order_id not in (select order_id from excluded)
union all
select 6, 'VAT included in prices', 0, -sum(included_tax)
from kept
union all
select 7, 'Refunds issued to cut off, excl. VAT', 0, -coalesce(sum(refund_net), 0)
from refunds
),
reported as ( -- computed independently, by the model the dashboard reads
select orders as rows_total, net_revenue as value_total
from {{ ref('fct_monthly_revenue') }}
where report_month = date '{{ report_month }}'
and as_of_date = date '{{ as_of_date }}'
)
select step_order, step, rows_delta, value_delta,
sum(value_delta) over (order by step_order) as running_total
from steps
union all
select 99, 'Unexplained',
(select rows_total from reported) - (select sum(rows_delta) from steps),
(select value_total from reported) - (select sum(value_delta) from steps),
null
Three details are worth a closer look. The function date(completed_at, 'Europe/London') turns a UTC time stamp into the UK calendar date, including the switch between summer and winter time5. The refunds have their VAT split upstream, in int_order_refunds, because a partial refund of a mixed basket carries its own share of tax. And the last row compares the bridge with fct_monthly_revenue, the model the dashboard actually reads, so a change to one without the other shows up as an unexplained difference.
A test that fails when the bridge does not close
A bridge that nobody checks quietly stops closing. In dbt, a singular data test is a SQL file that returns the rows you do not want, and the test fails when it returns any rows6. The file below is the whole test.
-- tests/assert_revenue_bridge_closes.sql (BigQuery)
{{ config(severity = 'error') }}
select step, rows_delta, value_delta
from {{ ref('rpt_revenue_bridge') }}
where step = 'Unexplained'
and (rows_delta != 0 or abs(value_delta) > 0.01)
The tolerance here is one penny, because rounding VAT order by order and on the total can differ by a penny. dbt also lets you turn a failure into a warning or set thresholds on the number of failing rows with severity, warn_if and error_if7, which helps when a later section introduces tolerances. With this test in the run, a bridge that stops closing blocks the report instead of misleading it.
Reconciling to the money: payments and settlement files
A bridge from the shop export proves your cleaning is consistent with the shop. It does not prove the shop is right. For that you compare with a source that has no reason to agree with you: the payment providers. Stripe and PayPal send settlement files, and Stripe's balance transactions carry, for every charge, refund and fee, the gross amount, the fee, the net and a reporting_category that groups related types (card charges and other payments both fall under charge)89. Stripe's payout reconciliation report then ties each payout in your bank account to the batch of transactions it settles10.
The comparison works best per payment, not per day. Day totals drift for innocent reasons: a payment recorded at 23:59:58 by Stripe and at 00:00:01 by the shop lands on two different days. Matched one by one on the provider's reference, the same payment is simply "matched, different day".
-- models/marts/reconciliation/rec_payments_vs_providers.sql (BigQuery)
with shop as (
select provider_ref, order_number, amount, captured_at
from {{ ref('stg_solidus__payments') }}
where state = 'completed'
),
providers as (
select provider_ref, amount, created_at, 'stripe' as provider
from {{ ref('stg_stripe__balance_transactions') }}
where reporting_category = 'charge'
union all
select provider_ref, amount, created_at, 'paypal'
from {{ ref('stg_paypal__settlement') }}
where event_type = 'payment'
)
select
coalesce(s.provider_ref, p.provider_ref) as provider_ref,
s.order_number,
p.provider,
s.amount as shop_amount,
p.amount as provider_amount,
case
when p.provider_ref is null then 'missing at provider'
when s.provider_ref is null then 'missing in shop'
when s.amount != p.amount then 'amount differs'
when date(s.captured_at) != date(p.created_at) then 'matched, different day'
else 'matched'
end as match_status
from shop s
full outer join providers p on s.provider_ref = p.provider_ref
The staging models convert Stripe's amounts, which arrive in the smallest currency unit (pence), into pounds, and give both providers the same column names. Any row whose status is "missing" or "amount differs" is a real question for a human. "Matched, different day" is expected and harmless.
Example: the £72 that crossed midnight
On 1 November, Callum's daily totals for 31 October disagree: the shop shows 70 payments worth £5,040.00, the providers show 71 worth £5,112.00. A day level check would raise an alarm. The per payment model shows one row with the status "matched, different day": a £72.00 card payment that Stripe recorded at 23:59:58 UTC on 31 October and the shop recorded at 00:00:01 UTC on 1 November, three seconds later, when its own code finished. On 1 November the difference reverses. Nothing is wrong, and the report says so instead of leaving Priya to wonder.
For the whole of October, each of the 2,014 orders that were not cancelled matched exactly one provider charge of the same amount. That includes the three test and staff orders, which were really paid. Wrenfield takes payment when an order is dispatched (an invented detail), so orders cancelled before dispatch never become a charge. The charges in the opening table, £143,118.00, are therefore the bridge's £142,932.00 plus the £186.00 of test and staff orders. The money confirms the shop.
Tolerances you agree with finance before anyone argues
A tolerance is the difference between two numbers that you have agreed, in advance, to accept without investigation. Agreeing it in advance is the whole point. Set on the day a number looks wrong, a tolerance is a negotiation. Set beforehand, it is a rule.
The most important detail: apply the tolerance to the unexplained remainder, not to the raw gap. Priya's dashboard and the accountant's figure are £2,150 apart for October, almost 2%. That gap is not a problem, because the bridge explains all of it. A gap of £40 that nobody can explain is more worrying than a gap of £2,150 that is fully explained.
A tolerance usually has an absolute part, so small months do not trip it with pennies, and a relative part, so large months do not trip it with rounding. Written as a formula (Foundations: percentages):
Here is the unexplained remainder of the bridge, is the reference figure (for example the ledger's net sales), is the absolute tolerance in pounds, and is the relative tolerance as a fraction.
Not every comparison deserves the same tolerance. Callum and Priya's accountant agree a short table:
| Comparison | Tolerance on the unexplained part | Why |
|---|---|---|
| Shop payments against provider charges, per payment | Zero: every payment matched within two days | It is money, and both sides are exact |
| Dashboard net revenue against the bridge | One penny | Rounding of VAT only |
| Dashboard net revenue against management accounts | The larger of £500 or 0.5% | Timing and booking differences are explained by a bridge, the rest is investigated |
| Google Analytics 4 (GA4) purchases against shop orders | Capture between 80% and 90% | Consent, blockers and redirects; see when analytics, ads and orders disagree |
| Ad platform conversions against shop orders | Trend only, no tolerance | Different attribution, never meant to match |
Example: Wrenfield's check against the books for October
The accountant's management accounts show October net sales of £111,700.00. The dashboard shows £113,850.00. Callum's ledger bridge:
| Step | Value |
|---|---|
| Dashboard net revenue, order view, as at 5 November | £113,850.00 |
| Add the staff purchase: a real sale that customer analytics leaves out | plus £100.00 |
| Test orders and checkout monitor orders: sold and refunded in October | £0.00 |
| Remove refunds issued in October for orders from earlier months | less £4,740.00 |
| Add back refunds for October orders issued 1 to 5 November (in the dashboard, not in October's books) | plus £2,490.00 |
| Ledger net sales for October | £111,700.00 |
| Unexplained | £0.00 |
The tolerance is the larger of £500 and 0.5% of £111,700, which is £558.50. The calculation:
The unexplained part is , well inside , so the check passes, even though the raw gap is £2,150.
A month earlier the same bridge left £32.00 unexplained. The cause was a £38.40 refund that someone made directly in the PayPal dashboard, so the shop never knew about it. £32.00 is the refund without VAT. It was inside the tolerance, so September's report went out with a one line note, and Callum added a check that flags provider refunds without a matching refund in the shop. The tolerance did its job: it let a small, known difference through without hiding it.
Order view and booking view: two honest ways to count refunds
The largest line in the ledger bridge has nothing to do with cleaning. It comes from a choice every shop has to make: in which month does a refund count?
In the order view, a refund belongs to the month of the order it reverses. A table lamp bought on 28 October and returned on 9 November reduces October. This view is right for behaviour: it tells you how many of October's orders came back, which is what you need to judge a product, a campaign or a cohort of customers. Its price is that a month keeps changing until its returns have arrived.
In the booking view, a refund belongs to the month it was issued. The same lamp reduces November. This is how bookkeeping works: a closed month stays closed, and later events are recorded when they happen. Its price is that a month's net sales mix in refunds from earlier months, so a bad September can make October look weak.
Both views are honest. The mistake is to show one under the name of the other, or to switch between them without saying so. Name both explicitly in the metric definition, put "order view" or "booking view" on every revenue tile, and let finance use the booking view while marketing uses the order view.
Example: October in both views
| Order view (dashboard) | Booking view (books) | |
|---|---|---|
| Sales in October, excluding VAT, cleaned | £118,800.00 | £118,800.00 |
| Staff purchase | not included | plus £100.00 |
| Refunds counted | Refunds for October orders known by 5 November: less £4,950.00 | Refunds issued in October for any order: less £7,200.00 |
| Net figure | £113,850.00 | £111,700.00 |
| Will it change later? | Yes, until October's returns are in | No, October is closed |
(The £7,200.00 of refunds issued in October is made up of £4,740.00 for earlier months and £2,460.00 for October's own orders. Test and monitor orders are sold and refunded within the month and cancel out in both columns, so they are left out of this table.)
Priya now understands why the two numbers will never be equal in a single month, and why that is fine. Over a whole year the views converge, apart from the returns of December's orders that fall into January.
Provisional numbers: label them, and estimate the rest
Some data arrives late by nature. Wrenfield offers 30 days for returns (an invented policy), the warehouse's returns file arrives up to five days late, and refunds take a few days more. Any order view metric for last month is therefore provisional for weeks. Official statisticians live with the same tension. The Office for National Statistics (ONS) distinguishes revisions, which bring in data that was not available at first publication, from corrections of errors, which fix mistakes, and it publishes early estimates on purpose because people need them, then revises them as better data arrives11. Germany's statistics office describes the trade off as a tension between timeliness and accuracy, and publishes a revision calendar12.
You can do the same on a small scale. First, mark every provisional number as provisional, with the date it becomes final. Second, if a decision needs the number now, estimate the final value from history. The method is borrowed from insurance, where claims for an accident year keep arriving for years. Actuaries call it the chain ladder, and Mack's paper on its standard error is the classic reference13. In its simplest form, you learn from past months what share of the final count is usually known by a given day, and scale up:
Here is the estimated final count (for example, refunded orders for a month), is the count known days after the month ended, and is the completion share: the fraction of the final count that past months had reached by day . The arithmetic is a ratio, covered in Foundations: ratios and rates.
Example: October's refund rate on 5 November
From the previous twelve complete months, Callum measures how much of each month's final number of refunded orders was known so many days after the month ended (Wrenfield's own invented history):
Callum uses the figures under the corrected rule v4 here, so the checkout monitor described later does not muddy the example. On 5 November, 118 of October's 1,980 orders have a refund. Five days after month end, the completion share is . The estimate:
So about 179 refunded orders are expected in the end, a refund rate of about 9.0% of 1,980 orders, rather than the 6.0% that the raw count suggests. The tile shows "5.96% so far, about 9.0% expected, final on 10 December". In early December, the final count turns out to be 178, so was off by less than one order.
The completion shares are easy to compute with pandas:
import pandas as pd
# One row per refunded order: the month the order was placed and its first refund date
df = pd.read_csv("refunded_orders.csv", parse_dates=["order_month", "first_refund_date"])
# Use only months whose returns are certainly complete (older than 120 days)
df = df[df["order_month"] < pd.Timestamp.today() - pd.Timedelta(days=120)]
month_end = df["order_month"] + pd.offsets.MonthEnd(0)
df["days_after_month_end"] = (df["first_refund_date"] - month_end).dt.days
final = df.groupby("order_month").size()
def completion_share(day: int) -> float:
known = (df[df["days_after_month_end"] <= day]
.groupby("order_month").size()
.reindex(final.index, fill_value=0))
return round((known / final).mean(), 2)
print({d: completion_share(d) for d in (5, 15, 35, 60)})
# {5: 0.66, 15: 0.84, 35: 0.97, 60: 1.0}
MonthEnd(0) moves a first of the month date to the last day of the same month, so the day count starts when the month closed. The simple average of ratios works for a stable shop. If the business changes shape, for example after a new returns policy, give recent months more weight or start the history after the change.
Metric definitions written once, versioned, and stored with the data
A number without a definition is an opinion. Every metric in a report needs a written definition that answers, at minimum: what is counted, what is excluded and by which rule, which date decides the period, which time zone, with or without VAT, order view or booking view, and since when this definition applies. Write it once, in one place, and make every chart point to it.
Then give the definition a version. When a rule changes, the definition changes, and a number calculated under version 3 is not the same number as one calculated under version 4, even if both are called "net revenue". The version belongs in three places: in the definition, in every row of the reporting tables (the rule version column from the chapter on cleaning pipelines), and on the report itself.
dbt gives you two useful hooks. The meta property takes any dictionary you like on a model, so the definition can live next to the code that computes it14. Exposures declare which dashboards depend on which models, so you can rebuild and test everything a dashboard reads with one command15. A point that catches experienced engineers: dbt's model versions are meant for changes to a model's structure, such as a removed column or a changed type. dbt's own documentation says that recalculating a column without changing its structure is a judgement call16. A change of meaning, such as a new rule for test orders, keeps the same columns, so model versions alone will not record it. You need the rule version in the data.
Example: the definition of net revenue at Wrenfield
# models/marts/reporting/_reporting.yml
models:
- name: fct_monthly_revenue
description: "Net revenue per month, order view. See meta for the full definition."
config:
meta:
metric: net_revenue
definition_version: 4
effective_from: "2026-11-18"
owner: "Callum"
counts: "Completed orders, UK local date of completion (Europe/London)"
excludes:
- "Test, staff and checkout monitor orders (rule test_orders v4)"
- "Orders cancelled before dispatch (state canceled)"
vat: "excluded"
refunds: "order view: refunds reduce the month of the original order"
provisional_until: "40 days after month end"
restatement_policy: "docs/restatement_policy.md"
columns:
- name: report_month
- name: as_of_date
- name: rule_set_version
- name: orders
- name: net_revenue
exposures:
- name: monthly_management_report
label: Monthly management report
type: dashboard
maturity: high
url: https://bi.wrenfieldhome.example/reports/monthly
description: "The report Priya reads on the fifth working day of each month."
depends_on:
- ref('fct_monthly_revenue')
- ref('rpt_revenue_bridge')
owner:
name: Callum
With this in place, dbt build --select +exposure:monthly_management_report rebuilds and tests everything the report reads, including the bridge and its test, before the report is refreshed. A later chapter in this series, on metadata, lineage and a semantic layer, takes metric definitions further.
Data notes: say on the dashboard what was excluded and why
A data note is a short line of text attached to a number, on the dashboard itself, that tells the reader what was done to the data. It costs almost nothing to add, it builds more trust than any chart, and almost nobody uses it.
A good data note has four parts: what was excluded or changed, how much (rows and value), why, and where to read more. It sits directly under the number, in plain words, not in a tooltip nobody hovers over. Keep the standing definition separate from the notes about this particular month: the definition says what always happens, the notes say what was unusual.
Example: the note under October's revenue tile
Net revenue, October 2026: £113,850.00 (order view, excluding VAT, rule set v3, data as at 5 November, provisional until 10 December)
Excluded: 3 test and staff orders (£186.00) and 22 orders cancelled before dispatch (£1,596.00). Five orders placed in the first hour of 1 October are included, which the shop export counts in September. Refunds known so far: 149 orders. More refunds will arrive, about 60 more are expected from the last twelve months. This figure will differ from the accountant's October net sales, because the books count refunds in the month they are issued. Full bridge and reconciliation: page 2 of this report.
Every sentence answers a question Priya would otherwise have to ask. The note is generated from the bridge model, so it cannot fall out of date.
Three kinds of change: late data, a better rule, a mistake
When a published number changes, readers deserve to know why, and the why decides what you do. There are three kinds of change, and accounting and official statistics have long since separated them.
Accounting standards draw the line clearly. Under International Accounting Standard 8 (IAS 8), a change in accounting policy is applied retrospectively, which means the past is restated as if the new policy had always applied. A change in an accounting estimate, caused by new information, is applied prospectively, from now on. A material error in a past period is corrected by restating the comparative figures for the periods in which it occurred17. Official statistics make a similar split, between revisions and corrections of errors, as above11, and the European Statistical System has written guidelines for harmonised revision policies18.
Translated to a data platform:
| Kind of change | Example | What you do with the past | What you tell readers |
|---|---|---|---|
| Late data (a revision) | Returns arrive after the report | Update provisional months until they are final, then freeze | Nothing special: the provisional label promised it |
| A better rule (a change of definition) | Duplicate customers are merged from now on | Restate the past under the new rule, or show both, never mix | A notice: what changed, why, the effect per month |
| A mistake (a correction) | A rule missed some test orders | Restate the affected months if the change is material | A notice with the cause and the fix |
Example: sorting Wrenfield's autumn changes
Between September and December, three things changed at Wrenfield. Callum sorts them:
- October's refunds kept arriving until early December. That is late data. The October numbers move, but the provisional label and the expected value told everyone in advance. No notice.
- In November, Priya decided that a guest checkout and an account with the same email address are one customer (the entity resolution from the duplicates chapter). That is a better rule. Customer counts change for every past month, so the past is restated, with a notice.
- Also in November, Callum found that a checkout monitor had been placing real orders every morning since July, and rule v3 did not exclude them. That is a mistake, found late. It moves several metrics by more than the threshold, so it gets a full restatement, described below.
Comparing periods across a rule change: restate, or show both, never mix
The most damaging thing a report can do after a rule change is compare a month under the old rule with a month under the new rule, as if nothing happened. The difference between the two months then contains the business change and the rule change, mixed together, and nobody can separate them by looking.
You have two honest options. Restate: recompute the past under the new rule, so every month in the comparison uses the same definition. Show both: for a transition period, show the old and the new series side by side, so the reader sees the size of the definitional jump. Restating is cleaner and should be the default. Showing both helps when the past cannot be fully recomputed, for example because the raw data needed by the new rule was not collected back then.
Example: new customers and acquisition cost across the duplicate merge
Customer acquisition cost (CAC) is the ad spend divided by the number of new customers it brought. The formula, with Foundations: ratios and rates for the basics:
Here is the ad spend in the period and is the number of new customers in the same period.
Wrenfield spends £14,000 a month on Google and Meta. Under the old rule (v1), September had 1,290 new customers. Under the new rule (v2), which merges the 3.1% of duplicate accounts, October had 1,262. A careless report puts these side by side:
So appears to go from £10.85 to £11.09. New customers "fell by 2.2%" and acquisition cost "rose by 2.2%". Priya starts asking whether the ads are wearing out. But recomputed under v2, September had only 1,250 new customers, because 40 of its "new" customers were returning customers who had checked out as guests:
Like for like, with counted the same way in both months, new customers rose by 1.0% and acquisition cost fell by 1.0%. The sign flipped. The mixed comparison did not just exaggerate the change, it pointed the wrong way.
The restatement: the checkout monitor case, start to finish
This is the worked case for the whole chapter. It is invented, like every example here, and labelled as an addition to the series' known problems.
In July, Callum set up a synthetic checkout monitor: a script that places a real order every morning at 6am to prove that the whole checkout works, from basket to payment. It buys a £12.00 tea towel with a free delivery voucher, pays by card, and refunds itself within the hour. It used the address checkout.monitor@mailbox.example, which is not on Wrenfield's own domain, so rule v3 (staff and test accounts by domain and by a flag on the account) did not catch it. From July to October, it placed 31, 31, 30 and 31 orders.
Revenue barely noticed: every monitor order was refunded in full, so net revenue did not move. Everything else did. Orders went up by about 1.6%. Average order value went down. And because the dashboard measured the refund rate as orders with any refund (a fine proxy until July), the refund rate jumped from about 9.0% to about 10.4%. Priya had been worrying about returns all autumn and was about to rewrite product descriptions.
Example: handling the rule change step by step
Callum follows the same procedure every time a rule changes. As a flow:
Step 1: classify. The monitor orders were always there and always identifiable. This is a mistake in rule v3, not late data.
Step 2: write rule v4, test first. Callum adds a dbt unit test with a fixture of four orders: a normal customer, a staff account on the shop's domain, a flagged test account and a monitor order. The test expects the last three to be excluded. It fails against v3 and passes against v4. The rule now also excludes orders from a short, reviewed list of service addresses, kept as a seed file in the repository, so adding the next one is a reviewed change, not a hidden edit.
Step 3: rebuild under both versions. Because raw data is never overwritten and every row carries its rule version, Callum can compute July to October under v3 and v4 side by side:
| Month | Orders, published (v3) | Orders, restated (v4) | Refund rate, v3 | Refund rate, v4 |
|---|---|---|---|---|
| July | 1,921 | 1,890 | 10.46% | 8.99% |
| August | 1,881 | 1,850 | 10.53% | 9.03% |
| September | 1,970 | 1,940 | 10.41% | 9.02% |
| October | 2,011 | 1,980 | 10.39% | 8.99% |
(Refund rates here use all refunds now known, so October is close to final.)
The second chart is the one that matters to Priya: the returns problem she had been worrying about since July never existed.
Step 4: test the threshold. Wrenfield's restatement policy (below) says a change is material if any headline metric moves by more than 1% or by more than £1,000. Orders moved by 1.6%, and the refund rate by almost 1.5 percentage points. Material, so a full restatement.
Step 5: publish with a change bridge. The restated October figures go out with a table that separates the causes of every change.
Splitting a change into its causes
Between the first publication on 5 November and the restatement on 7 December, two things changed at once for October: the rule (v3 to v4) and the data (more refunds arrived). A good restatement shows each effect separately. Change the rule first, holding the data fixed, then let the data move under the new rule (Foundations: percentages covers the percentage point arithmetic):
Here is the metric, computed with a rule version on a data snapshot . is the old rule, the new one, the data as at first publication and the data now. The first bracket is the rule effect, the second the data effect.
For October's refund rate, with the rule effect first:
So is a rise of 1.58 percentage points, made of a fall of 1.45 points from the corrected rule and a rise of 3.03 points from refunds that arrived late. The order of the two steps changes the split in general (it does not here for the order count, but it can for ratios), so fix the order once, rule first, and keep it in every restatement.
The full change table for October:
| Metric | Published 5 Nov (v3) | Restated 7 Dec (v4) | Change | From the rule | From late data |
|---|---|---|---|---|---|
| Orders | 2,011 | 1,980 | down 31 | down 31 | none |
| Gross sales including VAT | £142,932.00 | £142,560.00 | down £372.00 | down £372.00 | none |
| Net revenue | £113,850.00 | £111,375.00 | down £2,475.00 | none | down £2,475.00 |
| Average order value | £71.08 | £72.00 | up £0.92 | up £0.92 | none |
| Refund rate | 7.41% | 8.99% | up 1.58 points | down 1.45 points | up 3.03 points |
| Conversion rate (110,000 sessions) | 1.83% | 1.80% | down 0.03 points | down 0.03 points | none |
Without the split, the restatement would read "net revenue down £2,475", and someone would blame the monitor fix. With it, the reader sees that the fix moved orders and rates, and late refunds moved revenue, exactly as the provisional label had warned.
Keeping every published version
A restatement must never erase what was published. Priya made decisions on the old numbers, and in six months someone will ask why. So every time a report is published, Callum writes its figures to an append only table, with the rule set version and the data date:
-- BigQuery
create table if not exists reporting.published_kpis (
publication_id string not null, -- for example '2026-10-monthly-v1'
report_month date not null,
metric string not null,
value numeric not null,
rule_set_version string not null,
data_as_of date not null,
published_at timestamp not null,
reason string -- null for the first publication
);
-- Every metric of a month: as first published, and as it stands now
select
report_month,
metric,
first_value(value) over w as first_published,
last_value(value) over w as latest,
last_value(rule_set_version) over w as latest_rules,
last_value(reason) over w as latest_reason
from reporting.published_kpis
where report_month = date '2026-10-01'
qualify row_number() over (partition by report_month, metric order by published_at desc) = 1
window w as (partition by report_month, metric order by published_at
rows between unbounded preceding and unbounded following)
The qualify clause filters on a window function, here keeping one row per metric19. The table is the report's memory. It never sees an update or a delete, only new rows. Together with the history from the versioning chapter, it lets you reproduce any report exactly as it was on the day it went out.
A restatement policy on one page
A restatement policy decides, before anything goes wrong, when you restate, who approves it and how you tell people. Without one, every correction becomes a debate about whether it is "worth" mentioning, and the answer tends to depend on whether the correction is good news.
One page is enough. It needs a materiality threshold (when a change is big enough to restate published numbers), the periods covered (for example, the current year and the previous year), who approves, how readers are told, and the rule that old publications are kept. IAS 8 only requires the restatement of material errors17, and the same idea works for reporting: a penny of rounding does not deserve a notice, a wrong refund rate does.
Example: Wrenfield's policy and the notice Priya received
Wrenfield's policy fits on one page:
- Material: a headline metric (orders, net revenue, new customers, refund rate, conversion rate, CAC) moves by more than 1%, or by more than £1,000, in any published month.
- Periods: the current and the previous financial year are restated. Older months are recalculated in the warehouse but not republished.
- Approval: Callum prepares, Priya approves, before anything goes out.
- Notice: sent with the next report, and shown on the dashboard for 60 days.
- Memory: published figures are never deleted. Every report names its rule set version.
The notice Priya approved on 7 December:
Restated: orders and refund rate, July to October 2026. A checkout monitor that places one test order a day since July was counted as a customer. It is now excluded (rule set v4). Orders fall by 30 or 31 a month (about 1.6%). The refund rate falls from about 10.4% to about 9.0% for every month since July, so returns did not rise this autumn. Net revenue is unchanged, because every monitor order was refunded in full. October's net revenue also falls by £2,475.00 because late refunds have arrived, as expected for a provisional month. Full tables and the change bridge are on page 2 of this report.
It says what changed, why, how much, what it means for a decision, and where to check. No apology, no drama, no hiding.
Auditability: who changed which rule, when, and why
Auditability means that for any number you published, someone else can find out how it was made: which data, which rule versions, which code, approved by whom. It is what turns "trust me" into "check for yourself".
The pieces are not new, they just have to be connected. The code lives in version control, so every rule change is a commit with a reviewer. A small registry of rule versions, kept as a dbt seed, lists every version with its effective date, the change type from the three kinds above, and who approved it. Every reporting row carries its rule set version. And every release of the pipeline goes through tests before it reaches production. In my own work, every release goes through a test gate and into a release register, and a data rule is no different from any other code that affects money.
There is a legal echo here. Accounting law in some countries says it outright: in Germany, an entry in the books must not be changed in a way that makes the original content unrecognisable20, which is the same principle as never overwriting raw data and restating with history instead. UK law does not phrase it that way, but the Companies Act requirement to "show and explain" transactions1 is hard to meet for any figure whose history you have thrown away.
Example: the registry entry for rule v4
rule_id,version,effective_from,change_type,summary,approved_by,commit
test_orders,3,2025-03-02,better_rule,"Staff and test accounts by domain and account flag",Priya,4be19c2
test_orders,4,2026-11-18,correction,"Also exclude listed service addresses such as the checkout monitor",Priya,a71f0d9
customer_identity,2,2026-11-11,better_rule,"Guest checkout and account with the same normalised email are one customer",Priya,9c3e52a
When the accountant asks in March why July's order count changed, Callum does not need to remember. The registry names the version, the date, the reason and the commit. The commit shows the test that proves the rule does what the registry says.
Presenting confidence and limitations honestly
Cleaned data is better data, not perfect data. Some limits remain after every rule has run, and a report that hides them invites the reader to trust it more than it deserves. The fix is a short, standing limitations box in every report, plus intervals and ranges where a number is an estimate. Showing uncertainty honestly explains intervals, ranges and error bars in full, and the same principles apply to cleaned numbers.
What belongs in the box: anything the data cannot see (purchases GA4 never records because of consent and blockers), anything still provisional, anything estimated rather than counted, and any known gap in a source.
Example: the limitations box in Wrenfield's December report
What these numbers cannot tell you
- GA4 records about 15% fewer purchases than the shop, mainly because of consent choices and blockers. Channel and session figures are therefore estimates. Revenue and orders come from the shop and are complete.
- November's refunds are provisional until 10 January. The refund rate shown includes an estimate of the refunds still to come, based on the last twelve months.
- The warehouse's returns file arrives up to five days late. Returns physically received but not yet refunded are not in these figures.
- Customer counts merge duplicate accounts (rule customer_identity v2). Up to about 0.5% of customers may still be duplicates the rule cannot detect, for example a new email address after a move. (This last figure is Callum's invented estimate for the example.)
Four bullet points, each a fact and its consequence. Priya does not need to understand consent mode to read them, and she knows exactly which numbers to lean on.
What to say when someone asks why the dashboard does not match the shop
Sooner or later the question comes, often in a meeting and often a little sharply. A good answer has three parts and takes under a minute: both numbers are right for different questions, here is the bridge between them, and here is what would worry me. Then stop talking and show the bridge.
What not to say: "the shop is wrong", "it's complicated", or "the data is cleaned" with nothing behind it. Each of these asks for trust instead of earning it.
Example: a Monday question at Wrenfield
Priya: "The shop says 2,031 orders for October, your dashboard says 2,011. Which is it?"
Callum: "Both are right, for different questions. The shop counts every order that went through the checkout, by UTC date. The dashboard counts customer orders by UK date. The bridge is on the second page of the report: plus five orders from the first hour of October, minus three test and staff orders, minus 22 cancellations. Nothing is unexplained. If that bottom line ever showed anything but zero, I'd tell you before you asked."
Priya: "And the accountant's £111,700?"
Callum: "That's the booking view. It counts refunds in the month they're issued. The second bridge in the report takes you from my number to hers, line by line, and it closes too."
Thirty seconds, no jargon, and every claim is checkable on paper.
The monthly report, assembled
Everything in this chapter fits on three pages of a monthly management report. The order matters: the reader first sees the numbers, then the proof, then the limits.
| Page | What is on it |
|---|---|
| 1. The numbers | Headline metrics with targets and the same month last year. Each with its view (order or booking), rule set version, data date and provisional label. Data notes under each tile. Any restatement notice at the top. |
| 2. The proof | The revenue bridge from the shop export, the ledger bridge to the management accounts, the payment match summary (matched, different day, missing, amount differs), and the tolerance checks with pass or fail. |
| 3. The limits | The limitations box, the definitions table (which number for which decision), and links to the restatement policy and the rule registry. |
Example: the checklist Callum runs before publishing
| Check | October result |
|---|---|
| Revenue bridge closes (unexplained under one penny) | Pass, £0.00 |
| Every payment matched to a provider within two days | Pass, 2,033 of 2,033 |
| Ledger bridge inside tolerance (£558.50) | Pass, £0.00 unexplained |
| Provisional metrics labelled, with expected values | Pass, refund rate and net revenue |
| Rule set version on every tile | Pass, v3 |
| Published figures written to the append only table | Pass, publication 2026-10-monthly-v1 |
| Open restatements announced | None open on 5 November |
Seven checks, most of them automated as dbt tests in the same run that builds the report. A report that fails one does not go out until it passes or carries a note that says why.
Conclusion
Cleaned numbers are supposed to differ from the source, the payment providers and the books, because each answers a different question. Trust does not come from making them equal. It comes from showing, every time, exactly why they differ. Publish a reconciliation bridge from a number anyone can check to the number you report, count rows and value on every line, and test that it closes. Match payments one by one against the providers. Agree tolerances with finance in advance, and apply them to the unexplained remainder, not to the raw gap. Name the order view and the booking view, label provisional numbers and estimate their final value from history. Write every metric definition once, give it a version, and store that version on every row. When a rule changes, classify the change, restate the past or show both, never mix, split every change into its causes, and keep every published version. Do that, and "why does the dashboard not match the shop?" becomes a thirty second answer instead of a crisis.
