The Data Brief · Issue #4 · Semantic Layer Series
How to design a semantic model your whole organization actually agrees on
Most semantic layer projects fail before a single line of YAML is written. Not because of the tooling. Not because of the infrastructure. Because the organization never agreed on what "revenue" means.
The technical implementation of a semantic model is, frankly, the easier part. The harder part is the conversation you have to have with Finance, Sales, Marketing, and Product before you open your IDE. Get that conversation right and the model almost writes itself. Skip it and you will spend the next twelve months maintaining five versions of the same metric, each subtly wrong in a different way.
Before modeling anything, you need to understand how your organization actually uses data today — not how it thinks it does. Interview the people closest to the metrics: Finance, Ops, Product, Marketing leads. Not the data team. Business leads know what the numbers are supposed to mean.
The discovery checklist. For each candidate metric: What is the business question this metric answers? Who owns the definition? What are the edge cases (refunds, trials, internal accounts, multi-currency)? Are there known variants already in production? Which source systems feed it — and do they agree?
Pick the handful of KPIs that show up in every leadership meeting — customer count, revenue, CAC, retention — and define those first. These become your anchor metrics.
The core business objects your organisation reasons about: Customer, Order, Product, Account, Campaign. They map to physical tables but carry business meaning — defining what a "row" represents in human terms, including whether trials count and how duplicates are resolved.
The attributes you use to slice and filter metrics — Region, Product Category, Customer Segment, Time Period. The key design decision is granularity: a Region dimension that works for a US-only business will break the moment you expand internationally unless you planned for country, state, and territory hierarchies upfront.
The raw aggregatable values that metrics are built from — SUM(order_amount), COUNT(DISTINCT customer_id), AVG(session_duration). Measures live close to the data and must be expressed using aggregate functions. A good measure definition is specific enough to be unambiguous but general enough to support multiple derived metrics.
Named, governed business calculations built on top of measures. Revenue, Customer Acquisition Cost, Monthly Active Users, Net Revenue Retention. A metric is not just a formula. It is a formula plus a business decision about what to include, what to exclude, and which edge cases to handle.
The metric definition trap. SUM(order_amount) is a measure. "Revenue" is a metric — and revenue means: gross or net? Does it include tax? Does it include refunds? Does it exclude internal test orders? Does it use booking date or recognition date? Each of those is a business decision, not a technical one.
monthly_active_users, not MonthlyActiveUsers or MAU. Abbreviations are a major source of drift — spell it out.revenue_total, sessions_count, load_time_avg_ms. This prevents applying a second SUM on top of an already-aggregated metric.customer_acquisition_cost tells you what it is. The formula will change; the business question won't. Business names age better than formula names.Time is the most universal dimension and the one most frequently under-designed. Most teams add a date dimension and consider it done. Then someone asks for "revenue this fiscal quarter" and the model has no concept of a fiscal calendar.
Time intelligence checklist before you build. Does your organization use fiscal or calendar quarters? Which time zones matter — user-local, server, or UTC? Do you need rolling windows (7-day, 28-day, 90-day)? Do you need period-over-period comparisons (WoW, MoM, YoY)? Do you need "as of" reporting for point-in-time analysis? Each yes adds design requirements.
Notice what this definition contains beyond the formula: a plain-language description that explains edge cases, an explicit filter encoding business rules, a named owner, a review date, and synonyms for AI and search resolution.
Next in the series
Tool landscape: dbt, Cube, AtScale, Looker — an honest, vendor-neutral comparison