05 · Architecture · Definitions

Margin according to finance, sales, and the store manager is not one number

The data architect freezes the metric definition and which document the data comes from. Margin cannot have three algorithms at once. Movement after the definition is frozen goes to the data analyst.

Sketch of a data model

Each side calculates its own: Finance uses vouchers. Sales uses orders placed. The store manager uses receiving. Three tables are all called margin. The meeting cannot decide which one is wrong.

One algorithm, three names: Margin is only posted outbound and cost. Orders placed and receiving are called order amount and arrival amount. They may not be called margin again.

The data architect unifies which document a fact comes from

Master-data governance keeps customer numbers unique. The data architect keeps the metric unique: which document and which status this number is taken from, which cost is used, and when history may be changed. The job refuses the same name with a different meaning. Reporting projects fail, often not because the chart looks bad, but because three departments used one word for three algorithms, the system built all three, and the argument moved from Excel onto the screen.

The split with the data analyst is: the data architect freezes the definition and the source; the data analyst explains movement and anomalies after the freeze. While the definition is not frozen, analysis does not count. Otherwise every edition of the report changes the definition, and the business will not trust the data. There is also a split with backend: backend implements events and tables; this architect specifies which fields are facts and which are only process. Process data may change. A correction to fact data must leave a reversing entry. It must not overwrite.

What a definition note looks like

One page per metric: business definition, source document, status condition, time field, algorithms that are not allowed, and an owner. The owner must be someone in the business who can decide, not IT. The time field is written in stone. If an order uses order time or payment time is not written in stone, campaign-day results jump between two days. Changing a historical definition must be versioned. Old reports are marked with the old definition. Quietly recalculating so last month's meeting no longer matches the minutes is forbidden.

How the margin argument was closed into one table

A chain's monthly meeting argued about margin. Finance used posted cost and revenue in Kingdee. Sales used ordered-not-shipped. Store managers used store receipts. The data architect did not build three toggle switches. He asked the finance director to confirm that external reporting and appraisal use only the posted definition, and the other two numbers were renamed. Sales sees order amount. Store managers see arrival amount and receipts. A second margin no longer appears on the screen. Cost is the standard cost at posting. Later adjustments go through variance. They do not change margin on a date already published.

After it was built, he matched the three departments' old sheets against documents from the same day. The difference could be explained to document status, not to “the system has a problem.” The few that could not be explained had a status changed by hand. Those go back to the document to be fixed. The formula is not changed to hide them.

The data architect also specifies grain. Margin may be summed by day and by store. It may not be booked early from an order that has not shipped. If the summary table updates before the lines, a meeting will see a total that matches and lines that do not. He requires the summary to come only from frozen lines, and to drill to the document. A metric that cannot drill must not appear in the operations meeting. Otherwise the argument returns to “which screen to believe.”

When historical data is migrated in, he gives the old definition its own name. Results of the old algorithm are not poured into the new margin. The moment they are poured in, the new system inherits three algorithms. The data-migration engineer loads numbers under that name. The analyst marks the old definition's end date in the note. After the end date there is only one margin.

The time field is frozen on its own. If order amount takes order time or payment time is not written in stone, campaign-day numbers jump between two days. Changing a historical definition must be versioned. Old reports are marked with the old definition. Quietly recalculating so last month's meeting no longer matches the minutes is forbidden. A metric that cannot drill to a document must not appear in the operations meeting. Process data may change. A correction to fact data must leave a reversing entry. Backend implements events and tables. This role specifies which fields are facts. While the definition is not frozen, analysis does not count.

Back to the timeline

Bring the metric name three departments cannot match

The data architect first decides which document it is taken from.