Most metric definitions live in code only part of the data team can read. Terazu keeps the logic, but what a person certifies is a sentence, like the demo’s net sales: “Total net sales across Daily sales”, money in SAR, with what it means in plain words: sales after markdowns and before VAT. If the sentence is wrong, anyone who knows the business can say so.
Start from a shape
New Measures begin on Ontology › Measures, with a shape rather than a blank editor:
- A total, which adds up a column, or takes its level at the latest snapshot for things like stock on hand.
- A count of rows.
- A share: the rows that match, as a percentage, like a return rate.
- An average time between two dates, like days to ship.
- On time: the rows where one date is on or before another, for delivery and similar promises.
- One Measure ÷ another, like sales per store.
- A total × a looked-up value, such as units times a cost taken from another table through a certified relationship.
Point it at a meaning
A Measure is always defined on a meaning, never on a loose table. The form lists each meaning with the table that serves it and its grain (“one row per basket line”), or says plainly that no grain has been attested yet. Then you fill in only what the shape needs:
- Only rows where a column equals a value, stated as part of the definition.
- Can be sliced by the meaning’s own columns, and by columns one certified relationship away.
- Over time by one date column, by day, week or month.
- Who may ask: the roles that may ask for it, or everyone who may ask anything.
- Terms: the other words people use for this number.
A draft until a person certifies it
Every new Measure starts as a draft. A draft on a certified meaning can already answer a question that names it, and the answer says plainly that it isn’t certified. Certifying it takes a person, and the meaning it’s defined on must already be certified; a ratio needs both of its parts certified. The certification is pinned to exactly what was reviewed. Before anyone certifies it, Check before certifying computes the number the draft gives, over a period or every row, with the BI model’s own measure, computed from its definition, beside it where one exists. On the demo, net sales checked at 129,997,505.75 over 322,417 rows before Priya Sharma certified it.
Change what a Measure means (what it adds up, its unit, its date, its comparison, its sentence) and the certification goes back to draft. Add a synonym or a way to slice it, and the certification stands, because the number hasn’t changed.
When a question has no Measure yet
When no Measure covers a question, the chat can define one from it (a total, a count, a share or a ratio of two), checked against the certified meaning’s columns, and keep it as a draft that answers, marked not certified. Coverage and the refusal also offer “Define this Measure”, which opens this form with the shape already guessed from the question’s wording: “share”, “average”, “total”. Either way, a person certifies it, and until then it says it isn’t certified.
What it doesn’t do yet
- Filter values are typed in by hand; they aren’t suggested from the data yet.
- Plain averages of a column, minimums, maximums and distinct counts aren’t shapes yet.
- A share’s “out of” takes one condition: every row, or the rows where one column holds one value.