How to define ARR, churn, and active customers in a semantic layer — a reusable template so every metric means one thing everywhere.

Defining a metric in a semantic layer means choosing its dimensions, its measure, its aggregation, and its filters once — so every dashboard, data app, and AI agent returns the same number. This guide gives a reusable template, then applies it to three metrics teams argue about most: ARR, churn rate, and active customers.
Most metric disputes aren’t math errors — they’re definition gaps. Two people compute “churn” correctly and get different answers because they scoped it differently. The semantic layer exists to end that: define the metric once, and every consumer inherits it. But a semantic layer only helps if the definitions you put in it are right. Here’s a template for defining any metric, then three worked examples.
In Astrato’s Semantic Layer Editor, the measure and aggregation are a measure definition; the dimensions are dimension fields; and the filters/logic live in the measure or a custom SQL expression when the rule is more than a simple aggregation.
Annual Recurring Revenue is the normalized annual value of your active recurring contracts. It sounds simple and isn’t — the disputes are all in the filters.
The definition, in words: sum the recurring value of every active subscription, annualized. As logic:
ARR = SUM(normalized_annual_value)
WHERE contract_status = 'active'
AND revenue_type = 'recurring'
The trap: teams disagree on whether to include contracts mid-cancellation, or trials. Decide it once, write it into the measure, and every ARR number in the company now agrees. That’s the whole value of putting it in the semantic layer instead of a dashboard formula.
Churn measures what you lost over a period. The two decisions that change the number: customer churn vs revenue churn, and what counts as the starting base.
As logic, for customer churn:
Churn Rate = COUNT(customers_lost_in_period)
/ COUNT(customers_at_period_start)
Write both a customer-churn and a revenue-churn measure and name them distinctly (“Customer Churn Rate,” “Gross Revenue Churn”) so no one confuses them. Because they’re defined in the layer, a data app or dashboard showing churn is always using the agreed base — not whatever the report author picked.
This is the metric teams argue about most, because “active” is a business rule, not a data fact. The semantic layer is where you finally settle it.
As logic:
Active Customers =
COUNT(DISTINCT customer_id)
WHERE last_activity_date >= today - 90
The 90-day window is a choice, not a law — the point is that you make it once, in the layer, so “active customers” means the same thing in the board deck, the churn calc, and the AI answer. Defining it in plain business terms is exactly the kind of task a semantic-layer assistant can help draft, but the decision — 90 days vs 30, purchase vs login — stays with you.
Where Nash AI speeds this up
Defining these metrics is exactly the work Nash AI, Astrato's built-in assistant, is built to accelerate. You don't have to hand-write every measure: describe the metric in plain language — "create a churn rate metric," "define active customers as customers purchasing within the last 90 days," "create gross margin by product category" — and Nash translates that intent into a governed semantic definition that lives in the shared layer, not a one-off dashboard formula.
It reads your live semantic model as it goes, so it suggests the right measures and dimensions instead of inventing them, and it can build the more involved time-intelligence measures — YTD, MTD, YoY — that teams usually reach for SQL to write. Metric creation becomes a conversation instead of a development ticket.
Two things keep this honest and useful.
First, the judgment stays with you: Nash drafts the definition, but the decisions this article is really about — 90 days versus 30, purchase versus login, which contracts count toward ARR — are yours to make and confirm.
Second, in the semantic layer Nash also helps you keep definitions clean as they grow: ask it to describe your model, list every measure with its formula and source, or flag duplicates and gaps, and it surfaces where definitions conflict before they spread.
Nash isn't a conversational analyst you ask to interpret your business — it's a modelling copilot that makes defining and maintaining governed metrics dramatically faster, which is where the real time goes.
The semantic layer. A metric defined in a dashboard applies only to that dashboard; defined in the semantic layer, it’s inherited by every dashboard, data app, and AI query, so the number is consistent everywhere.
A measure is the aggregation in your model (sum of revenue). A metric is the full business definition — the measure plus the filters, window, and logic that make it “ARR” or “active customers.”
Almost always a definition gap, not a math error — different filters, windows, or bases. Defining the metric once in the semantic layer removes the gap.
Simple measures and aggregations are defined directly in the semantic layer editor. For logic beyond a basic aggregation, a custom SQL expression handles it — but the common metrics here are mostly measure-and-filter definitions.
See how Astrato runs natively in your warehouse.