Skip to content

Data Modeling & KPIs

When sales and controlling report different revenue for the same month, “revenue” has been calculated differently in several places. We build the star schema, semantic model and KPI catalog so that every metric is defined exactly once.

When sales and controlling report different revenue for the same month, the data is rarely the cause. “Revenue” was calculated differently in several places: in spreadsheets, in individual reports, or in queries someone wrote at some point.

We build data models in which every metric is defined exactly once. The star schema gives the data its structure, a semantic model holds the calculations, and a KPI catalog records what each metric means and who is responsible for it. Dashboards, Excel analysis and AI assistants then draw on the same definitions. How data is loaded, historized and organized in layers inside the data warehouse is a topic of its own. Here we deal with the model on top, which business teams and tools use directly.

Facts and dimensions

In a star schema, fact tables store events with numeric values, such as sales with quantity and amount. Around them sit dimension tables that describe what you filter and group by: product, customer, region, date. That matches how BI tools work, since every visualization groups by dimensions and aggregates values from facts. Microsoft explicitly recommends the star schema for Power BI models, partly for performance and partly for clarity.

In practice a lot depends on granularity. Each fact table has a fixed level of detail, for example one row per order line. If plan and actual values at different levels are mixed in the same analysis, the totals no longer add up. A shared date dimension makes prior-year comparisons and month-end closes behave the same everywhere, and order, delivery and invoice dates use it in different roles. Relationships run over keys that appear exactly once in the dimension. When a salesperson changes region, their earlier revenue has to stay with the old region, which is usually solved in the data warehouse.

The most common design mistake is taking the ERP’s tables over one to one. A model built around the source system instead of the business teams’ questions stays hard to understand.

Where the semantic layer lives

The semantic layer holds the calculation rules for the metrics so they are not rebuilt in every report. When a definition changes, it is adjusted in one place. Anyone working exclusively with Power BI defines metrics as DAX measures in the semantic model, and reports, Excel and Copilot all use the same model.

Inside the BI tool the layer is quick to set up but applies only there. As soon as several tools, applications or assistants need the same numbers, it belongs better in the data platform or in a separate layer that describes metrics, dimensions and access rules as code. Several vendors now offer dedicated objects for this. It is an architecture decision, and we make it based on the systems you have.

The KPI catalog

A KPI catalog describes each metric so that the business and technical sides mean the same thing. An entry contains the name and the decision the metric supports, a business definition (“Revenue is the invoiced net amount excluding cancellations”), the calculation with formula, filters, time reference and source, the person or role who approves changes, and the version, meaning since when the definition applies and what changed.

Metrics rarely stand alone. Revenue, contribution margin and profit build on each other and form a metric hierarchy. We reflect these relationships in the model so that deviations can be traced to one cause. For every metric it is settled who owns it on the business side. New metrics then do not appear in an individual report but go through a short, fixed route into the catalog.

We start with the metrics that decisions rest on and let the catalog grow from there. Anyone who tries to capture everything first rarely gets to the model.

Treating metrics like code

Definitions that exist only in a tool’s interface or in individual people’s heads cannot be checked. With metrics as code they sit as files in version control such as Git. Changes are reviewed, traceable and reversible. Most dedicated semantic layer tools work this way anyway, and in Power BI, semantic models can be saved and versioned as a Power BI Project with TMDL files. Automated tests add to that, for instance checking that the sum by region equals the grand total.

So that definitions are not tied to one vendor, several vendors are working on an open exchange format. The Open Semantic Interchange (OSI) is now being developed further under the name Apache Ossie at the Apache Software Foundation. Models with tables, relationships, dimensions and metrics are described in YAML. Tools such as dbt support the format, and Microsoft is involved too. The standard is still young and does not map every aspect of a model. It does not replace clean definitions, but it can make a later switch easier.

What an AI assistant expects from the model

Assistants that answer questions about company data read the semantic model: which metrics exist, what they are called and how tables connect. The more precisely this is described, the less they guess. That includes understandable names, descriptions, synonyms (such as “turnover” for “revenue”), consistent formats and hidden helper fields. Several vendors document this explicitly as a prerequisite for good answers.

Without such a model, an assistant would have to derive calculations from raw tables itself and would reach different results depending on the question. How chat features work in detail and how they are tested is covered under Conversational Analytics.

What you get

  • One definition per metric

    Each metric is defined once and applies in every report, in Excel and in chat.

  • Reports that are easy to build

    A clearly structured model simplifies new analysis and keeps queries lean.

  • Changes you can trace

    Definitions are versioned, reviewed and documented instead of scattered across individual reports.

  • Answers an assistant can get right

    An AI assistant needs described metrics and unambiguous relationships, otherwise it guesses.

Platforms & tools

We are not tied to any vendor and work with what is already running in the company. The list is a selection.

  • Power BI
  • Microsoft Fabric
  • dbt Semantic Layer
  • MetricFlow
  • Cube
  • Looker (LookML)
  • Databricks Metric Views
  • Snowflake Semantic Views
  • AtScale
  • Git
  • Apache Ossie

How we work

  1. Capture the metrics

    With the business teams we collect the metrics that are actually needed and clarify how they are calculated today and where the numbers differ.

  2. Design the model

    We split the data into facts and dimensions and design the semantic model with relationships, hierarchies and descriptions.

  3. Implement and check against known values

    The metrics are implemented as code, versioned and compared with known values from controlling and the business teams.

  4. Settle ownership and hand over

    We decide who approves and changes metrics, and hand the catalog and model over to your team with documentation.

Frequently asked questions

What is a semantic layer?
A semantic layer sits between the data and the analysis. It defines how metrics are calculated, how tables relate and what fields are called. Reports, Excel and AI assistants use it instead of each calculating metrics on their own. In Power BI this layer is called the semantic model.
What does good data modeling in Power BI look like?
Usually a star schema: fact tables holding the numbers, surrounded by dimension tables such as date, product and customer. Metrics are defined as measures in the model, not in individual reports. Tables and fields get understandable names and descriptions. When data preparation in Power Query becomes too heavy, Microsoft itself recommends an upstream data warehouse.
What belongs in a KPI catalog?
One entry per metric with name, purpose, business definition, calculation, data source, responsible person and version. What matters is that the business and technical sides mean the same thing by it. The catalog then serves as the template for the model rather than an extra document that goes stale.
Is the Power BI model enough, or do we need a separate semantic layer?
If Power BI is the only tool, the semantic model is usually enough. Once further tools, Excel access, applications or AI assistants come in, a semantic layer in the data platform or in a layer of its own can make sense, because then everyone uses the same definitions. We decide based on the systems you have.
What does metrics as code mean?
Metrics are described as files in version control such as Git. Changes go through review and approval, can be traced and rolled back, and automated tests compare the results with known values.
What is the Open Semantic Interchange, and is it worth using yet?
It is an open exchange format for semantic models, now developed further as Apache Ossie. The standard is still young and does not cover every aspect of a model. We recommend keeping definitions clean and vendor-neutral today, so that exchanging or switching later is easier.
Who should be responsible for metrics?
Ideally the business team that uses the metric for decisions, for example sales for order intake and controlling for profit. The data team owns the technical implementation. What matters is that every metric has one named person who approves changes.
Does a model for AI assistants have to look different?
Not fundamentally, but it has to be described more precisely. Assistants need understandable names, descriptions, synonyms and unambiguous relationships to know what is meant. A model built cleanly for dashboards is a good starting point, and we extend it specifically for chat.