Every number checked out. The report was still wrong.
a business whose largest customers are groups rather than single companies ·
Abstract
Somebody in management wanted to know which customers were worth the most.
That is a sorting problem, and it stays a sorting problem right up until a customer stops being one company. Their larger accounts are parents with branches underneath, and each branch places its own orders.
They asked for a better breakdown. What they got first was an explanation of why the one they had was lying to them.
Problem
Sales records are written by whoever placed the order. So the system records the branch. Faithfully, correctly, every single time.
Which means an account buying through several branches arrives as several customers, none of them big enough to look at twice. Their largest relationship in the business never appeared on any list of largest customers, and nobody had hidden it. It had been divided across its own doors by a system doing exactly what it was told.
This is the part worth sitting with. Nothing was broken. No data was missing, nothing was miscounted, and if you audited any row in that report it would check out. The report was accurate in every line and wrong as a whole.
That failure is harder to catch than a bug, because there is nothing to find. You cannot go looking for the missing customer. You have to already suspect that the way the rows are grouped is a decision somebody made, rather than a fact about the world.
Two more things sat underneath it, both about what a number is allowed to mean.
A sales figure that ignores returns flatters. And it flatters exactly the wrong accounts: the one that buys a great deal and sends a great deal back reads identically to the one that just buys a great deal. Those are not the same customer and no ranking built on gross sales can tell them apart.
Then there is the quieter one. Two reports that disagree about what counts as a sale are worse than one report. Once two numbers exist for the same question, every meeting about the number becomes a meeting about which number is right, and after that nobody fully trusts either.
Solution
The accounts get put back together.
Each parent is reported with its branches beneath it, and a summary across the whole group. Both questions get answered off the same page: how is this relationship doing, and which parts of it are carrying it. Answer only one and the reader goes back to the data, which is how a report quietly becomes something people stop opening.
Underneath that, the definitions got settled instead of assumed.
Returns and credits are netted, so what you are ranking is what the account actually kept. Cancelled sales are excluded on the same definition the neighbouring report uses, and that word matters: not a similar definition, the same one, so the two can never drift apart and start handing different people different answers. Everything converts to one basis, because a business trading in more than one currency has no answer at all to "how much did this account buy" until somebody decides the rule and applies it in both places.
None of that is clever. It is just decided, once, on purpose, which is a different thing from being left to whoever wrote each report.
And it runs against the accounts somebody chose rather than against everything. It is an instrument you point at a question, not a dashboard left running in a corner for nobody.
The part worth ending on is what this replaced. A report answering this already existed, over the same sales, and it was correct. Somebody read it, could not do anything with it, and asked for this instead.
So the work was never producing a number. It was cutting a number they already had along the line that made it mean something. That is the least glamorous version of this job and by some distance the most common.
The system described here is one we built and run. The situation around it is drawn rather than reported, because the details that would make it specific are the ones that would identify a client.
← All use cases