What a semantic layer does—and what it does not
A semantic layer translates technical data structures into terms that business users can understand. Instead of interpreting tables and columns individually, report creators work with shared descriptions of business objects and metrics. The layer stores rules governing how data is joined, filtered and analysed. It can be part of a BI solution or set up as a standalone component between the data platform and analytics tools.
Its main benefit is the reuse of business logic: multiple reports can access the same definitions rather than implementing them separately each time. Unlike a simple glossary, a semantic layer makes these definitions usable in queries. However, the extent of consistency depends on which reports and tools actually access the shared layer. Its mere existence does not standardise every analysis.
A semantic layer replaces neither data preparation nor agreement on business rules. Centralised modelling does not automatically resolve incorrect source data, missing records or conflicting business rules. Nor is it necessarily a separate data store: depending on the architecture, queries are passed to the underlying platform or stored datasets are used. Response times and the accuracy of results must therefore be assessed alongside data storage and processing.
Metrics, dimensions and relationships explained
Metrics are calculable quantities such as revenue, order count or average price. Their definition includes not only a formula but also the rule for aggregating individual values. Revenue can often be summed; an average price, by contrast, must be calculated from the total amount and total quantity rather than by taking an unweighted average of individual prices. Inventory metrics can usually be added across products, but not directly across points in time. The semantic layer describes these business characteristics so that analyses use the appropriate calculation.
Dimensions describe the attributes used to break down or filter metrics, such as product group, sales region or order date. They can contain hierarchies, such as product, product group and product range. Granularity is crucial: it describes what an individual data row represents, such as an order line or the monthly stock level for an item. Metrics and dimensions can only be combined meaningfully when their levels of detail are compatible in business terms.
Relationships define how the underlying tables are connected. This includes join keys and cardinality: for example, one product row may be associated with many order lines, while each line references exactly one product. The model also determines how a filter on a dimension restricts the calculation of a metric. Selecting a product group should then include only the corresponding lines. These rules turn technical tables into an analytical model that business users can understand.
- Metric: what is being measured, in which unit and using which aggregation rule?
- Dimension: which business attributes should be used to analyse the metric?
- Granularity: what exactly does an individual data row represent?
- Relationship: which keys, cardinalities and filter directions connect the data?
Revenue in practice: from business rule to shared metric
To establish a shared revenue metric, the business team first translates the term “revenue” into an unambiguous business rule. One possible example is: “Invoiced net revenue includes posted sales invoices excluding VAT, less related posted credit notes; drafts are excluded.” Discounts already included in invoice lines are not deducted again. This is an example of an internal reporting definition, not a universally applicable rule for revenue recognition in financial accounting. The name should also make this scope clear, for example “Invoiced net revenue by document date”.
Technical implementation starts at document line level. Each line is assigned a signed net amount: invoices increase the metric, while credit notes reduce it. If the source system already provides credit notes as negative amounts, the calculation must not reverse the sign again. Cancellations are accounted for exactly once, in line with the source system's logic. In this example, the date of each document determines its reporting period: a later credit note therefore reduces revenue in its own period rather than retrospectively changing the invoice month. Where multiple currencies are involved, a defined reporting currency and conversion rule are also required; amounts in different currencies must not be added directly.
The semantic layer provides this rule as a reusable metric rather than expressing it anew in each report. For business validation, a defined set of documents is independently recalculated using the agreed rules and compared with the metric's result. Differences from a financial summary are not automatically errors: that summary may, for example, use different period allocations or cut-off rules. What matters is being able to trace every difference to specific documents or different rules.
- Define the document scope: which invoices, credit notes and status values count towards invoiced net revenue?
- Specify the amount calculation: use actual transaction documents to verify net amounts, included discounts, signs and cancellations.
- Document the period and currency rules: determine the relevant date, reporting currency, exchange rate source and exchange rate date.
- Reconcile a reference dataset: calculate invoices, partial credit notes and cancellations independently, and explain differences at document level.
Maintaining definitions: ownership, testing and changes
A shared metric needs clear ownership. The business owner confirms what the definition means and which analyses it applies to. Technical ownership covers implementation, deployment and troubleshooting in the semantic model. A defined approval process connects both roles: change requests are documented with their rationale, affected definitions and expected impact. Central documentation also records who makes decisions when questions arise and which definition is currently approved.
Tests should do more than check whether a calculation can run technically. Business validation tests compare results for selected cases with previously agreed expected values. Regression tests reveal whether changes unintentionally alter results that were previously correct. Controlled test data with clearly traceable expected results is useful for this purpose. Dependent reports and interfaces should also be checked before release; a dependency overview helps narrow down the scope of testing.
Changes to approved definitions should be versioned and assigned an effective date. A key question is whether a new rule should also recalculate earlier reporting periods or apply only going forwards. This decision belongs in the business approval process and in the change notification sent to report users. For incompatible changes, running old and new definitions in parallel for a limited period can ease the transition. A documented rollback procedure limits the consequences of faulty releases.
- Assign business and technical owners and define the approval process for each central definition.
- Record change requests with their rationale, affected analyses and the decision on recalculating historical figures.
- Run tests against agreed business values and regression tests before release, and record the results.
- Publish the version, effective date and migration guidance; clearly label outdated definitions.
- Provide a rollback procedure for faulty releases and check its impact on dependent reports.
Checklist: assessing a BI solution's semantic capabilities
Assess semantic capabilities using a prepared test case rather than relying solely on a feature list. Ask for the same approved metric to be used in a dashboard, an ad hoc analysis and through an export or API access route relevant to your needs. What matters is whether these access routes actually execute the same definition and support the required filters. A central model view alone does not demonstrate consistent use across all routes.
Also clarify which capabilities are available in your intended operating model. Support for direct queries, imported data and external analytics tools may vary. Ask for concrete demonstrations of limitations, required additional components and options for exporting model definitions. For each assessment criterion, record whether it was met in the test, which conditions apply and how this affects your workflows.
- Access routes: can you demonstrate that dashboards, self-service analyses and required interfaces use the same approved definitions?
- Discoverability: can business users confidently select metrics using descriptions, business terms and a clearly visible approval status?
- Operating modes: which semantic capabilities remain available with direct queries, data imports and connections to external tools?
- Traceability: can users identify which model an analysis uses and which query it generates?
- Portability and scope: can model definitions be exported in a structured format, and which required capabilities depend on additional components?
Common pitfalls: double counting, date references and local calculations
Double counting often occurs when tables with different levels of granularity are joined: directly combining an order containing multiple lines and multiple payments can generate additional rows. As a result, an amount is summed more than once, even though the join appears reasonable from a business perspective. A semantic definition does not automatically prevent this. Relationships and aggregation paths must match the level of detail in the data; where necessary, lines and payments must be aggregated separately before the join. Applying DISTINCT to amounts is not a reliable fix, because it also merges genuinely separate transactions with the same amount.
Date references cause less obvious discrepancies. Revenue by order date answers a different question from revenue by invoice date; both analyses may be correct, but they must not carry the same label. Time zones, non-calendar financial years and cancellations recorded later add further complexity. If a cancellation is assigned to the original sales month, historical values change. If it is assigned to the posting month, the earlier period remains unchanged. Without a clear date reference, these differences can be mistaken for calculation errors.
Local calculations in reports or exports can bypass shared definitions without being noticed. Metrics whose results depend on the filter context are particularly sensitive: the average of individual margin ratios does not necessarily equal the margin calculated from total profit and total revenue. An overall value therefore need not equal the sum or average of the visible rows. Report-specific calculations should remain identifiable as such; hidden filters, excluded categories or different denominators must not appear under the name of a centrally defined metric.
- For unexplained high totals, check whether a join duplicates business transactions; do not look only at the number of result rows.
- For discrepancies between periods, compare the date field used, the time zone and the treatment of entries posted later.
- For ratios and averages, establish whether the overall value needs to be recalculated from the underlying quantities.
- For differences between reports, look for local formulas, hidden filters and overridden standard definitions.