New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
A report's grand total and the sum of its own rows have drifted apart, and nobody would notice until someone does the math by hand.
What you'll have at the end
One rule, written as a SQL query (or a spreadsheet formula), that runs on its own and flags the exact period where a reported total stops matching the sum of its own rows.
You need
A detail table you can query directly, like the orders you already pull with SQL, and a second number that claims to summarize it (a totals table, a dashboard tile, or a report export), sharing a date or key you can group both sides by.
Not covered
Reconciling two independently maintained reports that never shared a common source of rows, or tracking down a total that's exactly double from a join fan-out, are both a different check.
Leans on
Two reports that should reconcile, and currently do not
when the two numbers come from independently maintained reports that never shared a common source of rows, not a report and its own detail table
Catch a join fan-out that doubles your totals
when the total is too high because a join duplicated rows, rather than too low because rows went missing
Write a reproducible data cleaning log
for the standing log format a flagged row from this rule is worth recording in
Checked 26 Aug 2026
Part of the Data Cleaning and Validation for Analysts cookbook