CHAPTER IV / ENGINEERING

← Index

2026-08-06

KPI Math Belongs on the Server

A number that owners check every morning to decide whether the business is healthy deserves better than living in a cell someone can overtype. Spreadsheet KPIs fail this way constantly, and quietly: a formula gets dragged one row short, a manual override from a bad week never gets removed, a tab gets copied and the reference breaks. Nothing crashes. The dashboard just starts being wrong, and it keeps being wrong until someone happens to notice the number does not match reality.

The fix is not a training document telling people to be careful with formulas. It is removing the opportunity for the mistake to exist. On a retail operations platform I built, the calculation moved off the spreadsheet entirely. Sales, purchases, procurement, and spend all get entered through typed, validated forms by the staff who own that data, and the reporting views compute from those same entries in the system of record, not from anything assembled by hand afterward. Nobody can quietly edit what a KPI equals, because the KPI is not a cell. It is a query over the same audited facts every time it runs.

This is a smaller version of a pattern that shows up everywhere once you look for it: correctness that depends on a person remembering to do something right, forever, is not correctness. It is a training problem wearing the costume of a system. Move the logic into the layer where a mistake cannot silently ship, the schema, the query, the validation on the way in, and you stop needing everyone downstream to be careful. They can just read the number.

That trade costs more up front. Typed forms and a real data model take longer to build than a spreadsheet someone already knows how to use. What you get back is a KPI that means the same thing every time someone looks at it, which is the entire point of tracking one.