What is a metrics layer?
In practice, tools stop doing the math themselves. A dashboard asks for "ROAS by channel, last 30 days" and the metrics layer supplies the calculation.
It solves a specific problem: the same KPI rebuilt slightly differently in every dashboard, spreadsheet, and query. Centralizing the formula means a change happens once and reaches everywhere.
How does a metrics layer work?
Each metric is written as a definition rather than a query. The definition names the underlying data, the calculation, and the allowed breakdowns. When a tool requests the metric, the metrics layer generates the right query.
| Part of a metric definition | What it specifies | Example for ROAS |
|---|---|---|
| Formula | How the value is calculated | Revenue divided by spend |
| Filters | What is included or excluded | Revenue net of returns, paid media only |
| Time grain | How time is grouped | Daily, weekly, fiscal month |
| Dimensions | How it can be broken down | Channel, region, campaign type |
| Owner | Who approves changes | Marketing analytics, with finance sign-off |
What is an example of a metrics layer?
Three dashboards, one CPA
A paid social dashboard, a search dashboard, and an executive summary each calculate cost per acquisition. One counts all conversions, one only purchases, and one de-duplicates across platforms, so the three CPAs never match.
With a metrics layer, CPA is defined once, including which conversions count. All three dashboards request it by name and show the same number.
Metrics layer vs. semantic layer
The terms overlap and are often used interchangeably. The practical difference is scope: a metrics layer covers how KPIs are calculated, while a semantic layer covers what all the data means.
| Metrics layer | Semantic layer | |
|---|---|---|
| Main focus | KPI formulas and calculations | The full business meaning of the data |
| Defines metrics | Yes | Yes |
| Defines business entities and relationships | Sometimes, only as needed for metrics | Yes: accounts, campaigns, ads, and how tables connect |
| Calendars and time logic | Basic time grains | Fiscal and promotional calendars |
| Naming and taxonomy mapping | No | Often, such as mapping platform labels to business categories |
| Typical relationship | A component | The broader layer that includes it |
Why does a metrics layer matter?
Metric drift is a common reason reports disagree. Small differences in a formula or filter produce different numbers, and meetings start with reconciliation instead of decisions.
- One formula per KPI. Every tool calculates it the same way.
- Change once. Updating a definition reaches every report at the same time.
- Self-service with guardrails. More people can explore data without inventing their own math.
- Consistent AI answers. AI tools use the same metric definitions as the dashboards.
How does Alli do this?
In Alli by PMG, metric definitions live inside Alli Semantic Layer rather than in a separate metrics store. KPIs like ROAS, CPA, conversion rate, and cost per lead are defined once, consistently across every region and currency, alongside the business entities, calendars, and Categorizations rules that give the rest of the data its meaning.
Every dashboard, Data Explorer view, Ask Alli answer, alert, and planning tool reads those same definitions. For the broader concept, see the glossary entry for semantic layer.
Explore Alli Semantic LayerMetrics layer FAQ
Is a metrics layer the same as a semantic layer?
Not exactly. A metrics layer defines how KPIs are calculated. A semantic layer usually includes that, plus business entities, relationships between data sources, calendars, and naming taxonomy.
What is headless BI?
Headless BI is a term for defining metrics in a layer separate from any one dashboard tool, so many tools can use the same definitions. A metrics layer is the core of that approach.
Do I need a metrics layer if I have a BI tool?
BI tools can define metrics, but those definitions usually stay inside that tool. A metrics layer makes the same definitions available to every tool, including AI.
Who owns the metrics layer?
Data and analytics teams usually maintain it, with business owners such as marketing and finance agreeing how each KPI should be defined.
Last updated ‹ Back to the glossary
