Analytics

Metrics Layer Starter

Define each business metric once and use it in every report.

Templates for building a shared metrics layer: how each metric is defined, who owns it, how it is tested, and how it is approved for use. We start with the metrics behind the decisions your teams make most often. Then we connect your reporting and self-service tools to those definitions.

GIST stepGroundIterate
Download the PDF
What you get

The same number in every report, with a named owner for each metric.

Free download · PDF · 10 pages

Get the Metrics Layer Starter overview

The problem it solves, what is included, how it works, the technical components, and how we adapt it with you.

The problem

Every report has its own version of net sales.

Each dashboard rewrites the same metric in its own SQL. Numbers disagree between teams, meetings get spent reconciling them, and nobody can say which figure is right or who owns it.

What this accelerator does

The Metrics Layer Starter defines each metric once, with an owner and tests, and connects every report to that definition.

What's included

One definition per metric, with a named owner.

Four parts, each adapted to your data, platforms, and controls. What we adapt for you is yours to keep.

01

Metric definition templates

A short file per metric: what it counts, who owns it, how it may be sliced, and how it is tested.

02

Semantic model patterns

Sources, dimensions, and measures, with exports to the dbt Semantic Layer and Power BI.

03

Approval workflow

Certification by someone other than the owner, recorded against a fingerprint of the definition.

04

Reconciliation tests

Each metric checked against the system finance or operations already trusts.

How it works

How it works.

  1. Models

    Say where data comes from, which column is the date, and which dimensions and measures exist.

  2. Metrics

    Simple, ratio, or derived metrics built on measures. Ratios compute after aggregation.

  3. Compiler rules

    A metric is sliced only by its allowed dimensions, never at a finer grain than defined.

  4. Tests

    Not null, range, dimensions sum to total, and reconciliation against a source figure.

  5. Certification

    Passes only when every test passes, dependencies are certified, and the certifier is not the owner.

  6. Change control

    Any edit changes the fingerprint and flags the metric until it is certified again.

Technical detail

Under the hood.

Vendor-neutral Python and configuration, Azure first, with tests included from the start.

Metric files
YAML definitions with owner, logic, allowed dimensions, and tests
SQL compiler
Simple, ratio, and derived metrics in SQLite and ANSI dialects
Test runner
Runs tests against the warehouse, including reconciliation
Certification
Records who approved which version of each definition
BI exports
MetricFlow YAML for the dbt Semantic Layer and DAX measures for Power BI
Metric catalog
A readable list of certified metrics for business users
Proof in the package

Worked example: an order warehouse and a general ledger.

Gross sales, refunds, net sales, and order counts are defined once and tested against the ledger.

What the tests show
  • Gross sales, refunds, and order counts pass and are certified
  • Net sales for August is 1.85% below the ledger
  • The cause: a manual journal not yet reversed
Result

Net sales stays uncertified until someone explains the gap. The number does not reach a board pack until it can be defended.

How we run it with you

Adapted in the first cycles, handed over at the end.

  1. 01

    Pick the first set

    Five to ten metrics behind frequent decisions, and the ones people argue about.

  2. 02

    Agree definitions

    In plain words with each owner first, then written as a definition file.

  3. 03

    Reconcile and certify

    One reconciliation test per metric, certified by someone other than the owner.

  4. 04

    Connect BI tools

    Reports pointed at the definitions, old calculations retired, every change tested in CI.

You keep the definitions, the tests, the certification record, and the BI exports, versioned in your repository.

Where it fits

Platforms, related accelerators, and limits.

We state the limits up front, and we recommend tools based on fit. We do not resell platforms.

Works with

  • Snowflake, Databricks SQL, PostgreSQL, and DuckDB through ANSI SQL
  • dbt Semantic Layer through the MetricFlow export
  • Power BI through DAX measures

Pairs with

  • The Data Readiness Assessment surfaces definitions that need agreement
  • Runs on the Data Platform Foundation gold layer
  • Uses golden records from the Master Data Starter

Assumptions and limits

  • The compiler handles single-table models; joins across models use the dbt export
  • Small ANSI syntax differences are checked on your warehouse
  • Distinct counts are not additive, and tests account for that

Take the overview with you.

Get the 10-page PDF to share with your team, or tell us the decision you want to improve and we will tell you whether the Metrics Layer Starter fits.