The problem it solves
Without one, a metric is redefined wherever it is used. Finance computes revenue one way in a spreadsheet, the sales dashboard computes it another way in a report, and a third definition lives inside a scheduled export nobody has opened in two years. All three are defensible. None agrees with the others.
The cost shows up as meetings. A leadership review becomes a reconciliation exercise, and the organization quietly loses the single source of truth it spent years building.
What a semantic layer contains
Entities and relationships. Which tables exist, how they join, and at what grain — so a query cannot silently double-count by joining at the wrong level.
Measures. The calculations themselves, expressed once. Revenue, margin, active accounts — each with one definition every consumer inherits.
Access rules. Row-level security as a property of the model rather than of who happened to receive which file, so a regional manager sees their region because the model says so.
The property that matters most
A definition that lives in source control is a reviewable diff with an author and a date. That is what lets a disputed number be reconciled in a meeting instead of argued about — you can point at when it changed and who changed it.
An example
Take net revenue. Defined once in the semantic layer, as a Power BI measure written in DAX, it reads:
Net Revenue = SUM ( Sales[Amount] ) - SUM ( Returns[Amount] )
Every dashboard, spreadsheet connection and AI agent that asks for net revenue now runs that one expression. When finance changes how returns are counted, the change is made once and reviewed once, and every consumer picks it up on the next refresh.
Semantic layer, data warehouse and BI tool
| Layer | What it holds | The question it answers |
|---|---|---|
| Data warehouse | The data itself: tables at the grain they were loaded | What happened, row by row? |
| Semantic layer | The meaning: joins, measures and access rules | What does this metric mean, and who may see it? |
| BI tool | The presentation: visuals, layout and filters | How should it be shown? |
The three are often bought together, which is how a definition ends up trapped inside one dashboard file. Kept apart, the warehouse can be restructured without breaking the reports on top, because only the semantic layer has to follow.
Where a semantic layer lives
It can sit inside a BI tool or alongside the warehouse. In Microsoft's stack it is the Power BI semantic model, which was called a dataset until 2023. Standalone options such as the dbt Semantic Layer, Looker's LookML and Cube serve the same definitions to several tools at once. The choice matters less than the rule: one definition per metric, kept in source control.
Why it matters more once AI is generating queries
A model asked for "revenue by region" against raw tables will produce something plausible. Whether it matches the definition finance uses is a coin flip, and the answer arrives with the confident phrasing that makes it hard to question.
Pointed at a semantic layer instead, the model selects an existing measure rather than inventing a calculation. The governance you already built becomes the constraint on what the AI is able to assert — which is the cheapest way to make generated analytics trustworthy.
Questions this answers
What is a semantic layer used for?
To give every report, spreadsheet and AI agent the same definition of each business metric, the same joins and the same access rules, so the numbers agree across departments and a change to a definition is made once.
Is a semantic layer the same as a data warehouse?
No. The warehouse stores the data; the semantic layer defines what it means: how tables join, how each measure is calculated and who may see which rows. One warehouse can serve several semantic models.
Does an AI agent need a semantic layer?
If it answers questions about business metrics, yes. Without one, the model writes its own calculation each time, and it may not match the definition finance uses. With one, it selects an existing measure, so its answers inherit the governance already in place.