Level 1: Model the data
Self-service needs a contract, not a license.
Licenses give people access. A metric contract tells them which number is official, what it means, and what it does when the data is missing.
On this page
Most self-service rollouts start with licenses and a training session. A few months later there are four versions of revenue, each one built by someone trying to help. None of them is malicious. They just weren't told which number is official, or what it means.
Licenses aren't the hard part
A license gives someone access to the data. It doesn't tell them which measure to use, which date it runs on, or what an empty cell means. So people work it out, and each of them works it out a little differently.
What makes self-service work is a contract: a short, written agreement for each official measure. What it answers, which date it uses, what it does when data is missing, and who's allowed to change it. People build whatever they like on top. The contract stays put.
Figure 1 · Written, locked, open
The one-page contract
Here's mine for the measure from guide 1. It fits on one page, and every line is something I've seen go wrong when it was missing.
measure: Net Revenue (reporting date) answers: Recognized revenue for a period, by reporting date owner: A named person in finance reporting status: Approved, version 1.0 source: Revenue. One row per recognized revenue entry. date_rule: Reporting date. Start inclusive, end exclusive. required: A period. There is no default period. not_this: Not accounting-date revenue. Not a term amount. no_rows: "No records". Never 0.00. zero: 0.00, complete unknown_date: Withhold the total. Say how many rows have no date. reference: April 2025, C-001, P-01 = 100.00 All of 2025, C-001, P-01 = 400.00 changes: Owner approves. Reference answers rerun first.
Two lines matter more than they look. "There is no default period" stops a tool from quietly answering for all time when someone forgets to ask for April. That's the 400.00 from guide 1. And the reference answers turn the contract into something you can test, not just something you can read.
The three empty cases
The contract says no rows, a zero and an unknown date give three different results. To show them, I add two obviously made-up rows to the example: R-004, a June entry of 0.00, and R-005, an entry of 50.00 with no reporting date. Each case is run on its own.
Figure 2 · Three empty cases
This query returns a status with the amount. As written, it asks for April. Change the two dates to ask for another month.
SELECT CASE WHEN SUM(CASE WHEN reporting_date IS NULL THEN 1 ELSE 0 END) > 0 THEN 'Withheld: unknown date' WHEN SUM(CASE WHEN reporting_date >= '2025-04-01' AND reporting_date < '2025-05-01' THEN 1 ELSE 0 END) = 0 THEN 'No records' ELSE 'Complete' END AS status, CASE WHEN SUM(CASE WHEN reporting_date IS NULL THEN 1 ELSE 0 END) > 0 THEN NULL ELSE SUM(CASE WHEN reporting_date >= '2025-04-01' AND reporting_date < '2025-05-01' THEN amount END) END AS amount FROM revenue WHERE customer = 'C-001' AND product = 'P-01';
On the base data it returns Complete, 100.00. For July it returns No records with no amount. For June, with R-004 added, it returns Complete, 0.00. For April, with R-005 added, it returns Withheld: unknown date, because R-005 could belong to April and there's no way to prove it doesn't.
In Power BI, a status measure next to the value does the same job:
Revenue Status = VAR UnknownDates = CALCULATE ( COUNTROWS ( Revenue ), ISBLANK ( Revenue[Reporting Date] ), REMOVEFILTERS ( 'Date' ) ) VAR RowsInPeriod = COUNTROWS ( Revenue ) RETURN SWITCH ( TRUE (), UnknownDates > 0, "Withheld: unknown date", RowsInPeriod = 0, "No records", "Complete" )
Lock the official measures
In Power BI, locking usually means one shared semantic model with the contract measures in it, endorsed as certified. People get Build permission and make their own reports on top. They can add measures in their own reports, but they can't change the official ones, and the official names stay official.
In dbt, the semantic layer's metrics play the same role: defined once in code, reviewed like code. The tool matters less than the rule. One definition, one owner, and reference answers that rerun before every change.
What the contract gives an AI tool
The same contract is the best context you can give a tool that answers questions from the model. It says which measure answers "revenue", which date it uses unless someone asks for another, that a period is required, and what to say when the answer is withheld. Without it, the tool fills each of those gaps on its own, and it won't tell you it did.
It also gives you a way to check the tool. Ask it the reference questions. If it doesn't return 100.00 for April and 400.00 for 2025, the problem shows up before anyone relies on it.
What I check before any tool answers from a model
- Does every official measure have a contract with an owner and reference answers?
- Are no rows, a zero and an unknown date three different results?
- Can self-service users build on the official measures without being able to change them?
- Do the reference answers rerun before every release?
Give people the license. Give the numbers a contract.