Microsoft Fabric IQ · Public preview · Updated 24 November 2026

Microsoft Fabric Semantic Views: Tutorial, YAML, Relationships & Semantic Models

Create a reusable business definition beside your Lakehouse tables, publish a Direct Lake semantic model, and use the same revenue metric in Power BI and Fabric data agents. This walkthrough shows exactly where each file belongs, how to create relationships, and what the preview cannot do.

Independent practical guide · Documentation reviewed 24 November 2026 · A.J.

Quick answer

A semantic view is a set of YAML definitions for datasets, relationships and DAX-based metrics, stored under Context/Semantic Views/<name>/ in a Fabric Lakehouse. When you publish, Fabric compiles read-only output in SystemContext and creates a read-only Direct Lake on OneLake semantic model. Reports and agents query that model—not the YAML directly. Semantic views complement, rather than replace, ordinary Power BI semantic models.

Before starting: this feature is in public preview. Use a test workspace without Git integration, deployment pipeline connections, Power Platform solutions or workspace-level private links. You need Lakehouse Write permission and Contributor (or higher) workspace access to publish. Microsoft requirements.

What is a semantic view—and why did Microsoft create it?

Teams often calculate the same metric in multiple places. A report can define revenue one way, a data agent can use a different expression, and another Lakehouse can store a separate set of business definitions. A semantic view lets you maintain a portable, human-readable set of definitions alongside OneLake data, and reuse those definitions without copying the underlying tables.

It is not a SQL view, materialized view, data transformation engine, or new replacement for the Power BI semantic model. The YAML stores meaning: table aliases, relationship paths, measure expressions and descriptions. Publishing translates the supported definitions into a generated semantic model, which executes DAX queries through Direct Lake.

Define onceDescribe datasets, relationships and business metrics as versioned YAML source files.
Reuse safelyShare all or part of those definitions using OneLake shortcuts, then publish against local Lakehouse data.

At this preview stage, not every capability in the underlying Apache Ossie format is compiled into Fabric. DAX is required for published metrics and broader Power BI modeling features remain better suited to a directly authored model.

Where are Context, SystemContext and the semantic model?

How a Fabric semantic view becomes a semantic modelLakehouse Delta tables feed an editable YAML semantic view in Context. Publishing compiles generated TMDL in SystemContext and a read-only Direct Lake semantic model, consumed by reports and data agents.Lakehousedbo.factsalesdbo.dimstoredbo.dimproductsContextSemantic Views/salesschema.yamlmetrics.yamlPublishGeneratedSystemContextTMDLread onlyDirect Lakesemantic modelReportsData agentsRead onlyEdit YAML in Context. Never edit generated output in SystemContext.
Illustrated architecture, based on Microsoft’s current preview documentation. It is not a screenshot of the Fabric portal.

The part that confuses many first-time users is seeing two folders. They do different jobs. Context is the editable source of truth; SystemContext is the generated representation. The separate workspace semantic model is the object Power BI and agents connect to.

LocationWhat belongs thereWhat to edit
Tables/dbo/Delta tables containing the actual source rowsSource data through approved data-engineering processes
Context/Semantic Views/sales/schema.yaml, metrics.yaml and other supported definitionsThese YAML files, then Publish
SystemContext/Semantic Views/sales/Generated, read-only Tabular Model Definition Language (TMDL)Never edit; inspect for generated output
Workspace item named salesRead-only Direct Lake on OneLake semantic modelConsume in reports/agents; change YAML to update

Where do you create relationships? In the semantic view YAML, under relationships. They appear in the generated model after publishing. Don’t create them by editing the generated model diagram; that diagram is for inspection.

Advertisements

Build a semantic view using Microsoft’s sample sales data

The following example follows the official Fabric sample so you can verify actual expected answers. It uses a schema-enabled Lakehouse and three small tables. The sample has six sales, three stores and three products—not a fictitious schema you have to guess.

Prepare the data in a separate Lakehouse

  1. Create a test Lakehouse named lakehouse_sales with schemas enabled, in an eligible Fabric workspace.
  2. Download Microsoft’s Fabric sample files using the specific links in the official semantic views tutorial: FactSales.csv, DimStore.csv, and DimProducts.csv.
  3. Inside Lakehouse Files, create semantic-view-samples and upload the files.
  4. For each, select Load to tables → New table, choose the dbo schema, select Column header, and create factsales, dimstore, and dimproducts.
  5. Confirm counts of 6, 3 and 3 respectively, and that revenue and units are numeric before continuing.

These are Microsoft tutorial sample files. A CSV preview is not the same as a successfully created Delta table; verify under Tables → dbo.

Create the view from the Lakehouse—not the SQL endpoint tab

Open the Lakehouse view and select New semantic view on the ribbon. Enter sales. Fabric creates Context/Semantic Views/sales/ with a starter sales_semantic_view.yaml. Rename it to schema.yaml and replace the starter text with the model definition below. If you upload complete files instead, remove incomplete starter examples so all published YAML is consistent.

If New semantic view is missing: verify you’re on the Lakehouse view, not the SQL analytics endpoint, and check workspace eligibility, Write permissions and preview availability. A missing button isn’t evidence that your SQL endpoint is broken.

Define the datasets and relationships in YAML

Sales relationships in the sample semantic viewFact sales has StoreId and ProductId foreign keys. A many-to-one relationship connects sales to unique stores and products. Metrics calculate revenue and sale count from the sales table, and dimensions filter the facts.salesSaleIdStoreId · ProductIdUnits · RevenueUSDstoresStoreId (unique)RegionproductsProductId (unique)Category1**1Define relationships in schema.yaml; measures in metrics.yaml.
Illustrated sample model relationships. Validate unique keys on the dimension side before publishing.

There are three dataset aliases here. sales maps to dbo.factsales; stores maps to dbo.dimstore; and products maps to dbo.dimproducts. DAX and relationships refer to the aliases, not the underlying schema-qualified names.

schema.yaml — tables and relationship paths
version: 0.2.0.dev0
name: sales
description: Sales definitions for reporting and agents.
datasets:
  - name: sales
    source: dbo.factsales
    description: One row per sale line.
  - name: stores
    source: dbo.dimstore
    description: Store and region attributes.
  - name: products
    source: dbo.dimproducts
    description: Product and category attributes.
relationships:
  - name: sales_to_stores
    from: sales
    to: stores
    from_columns:
      - StoreId
    to_columns:
      - StoreId
  - name: sales_to_products
    from: sales
    to: products
    from_columns:
      - ProductId
    to_columns:
      - ProductId

Each relationship declares the many-side dataset in from and the unique-key dimension in to. This preview supports a single column per relationship and active, unambiguous paths. Check that StoreId and ProductId are unique on the dimension side. Fabric does not invent the business relationships for you.

The name property is required in each YAML file, but Fabric uses the view folder’s name for the generated model, not this property. The description in the file becomes a description in the generated model.

Advertisements

Add DAX metrics and publish the view

Create a second file named metrics.yaml in the same view folder. Each metric needs a DAX expression using the YAML dataset aliases, such as 'sales'[RevenueUSD]. These metrics become measures in a generated Metrics table.

metrics.yaml — reusable business metrics
version: 0.2.0.dev0
name: sales
metrics:
  - name: Total Revenue
    description: Sales revenue in US dollars.
    expression:
      dialects:
        - dialect: DAX
          expression: "SUM('sales'[RevenueUSD])"
  - name: Sale Count
    description: Number of unique sales.
    expression:
      dialects:
        - dialect: DAX
          expression: "DISTINCTCOUNT('sales'[SaleId])"
  - name: Units Sold
    description: Total units sold.
    expression:
      dialects:
        - dialect: DAX
          expression: "SUM('sales'[Units])"

Save both files, then right-click the sales view folder under Context and choose Publish. Saving files alone does not rebuild the semantic model. Publishing merges the view’s YAML, validates the supported constructs and creates or updates the sales semantic model in the workspace.

To inspect the result, expand SystemContext → Semantic Views, right-click sales, and choose Open in model view. You should find three tables, two relationships and a Metrics table. You need inherited model Write permission to open this inspection view, but the generated model itself remains read-only.

Run a DAX test and compare expected results

On the generated view folder choose Validate in DQV and run:

DAX — revenue, sale count and units by region
EVALUATE
SUMMARIZECOLUMNS(
    'stores'[Region],
    "Revenue", [Total Revenue],
    "Sales", [Sale Count],
    "Units", [Units Sold]
)
ORDER BY 'stores'[Region]
RegionRevenue (USD)SalesUnits
France302256
Germany290253
Netherlands263249
Total8556158

These numbers come from Microsoft’s sample. If you get different values, check input types, table counts and relationship key mapping—not just the measure expression. Try a second query grouped by 'products'[Category]; the official sample returns Ice Cream revenue 747 and Sorbet revenue 108.

Update one business definition safely

Add the following metric beneath the existing metrics entries and publish again. The expected unfiltered result is 142.5, calculated as $855 divided by six sales.

Append to metrics.yaml — average revenue
- name: Average Revenue per Sale
    description: Revenue divided by number of sales.
    expression:
      dialects:
        - dialect: DAX
          expression: "DIVIDE([Total Revenue], [Sale Count])"

Republish after any metric update and rerun the DAX validation. Consumers using the generated model can then access the new measure. Check downstream report compatibility before renaming or removing existing metric names.

Use the published definitions in Power BI and Fabric data agents

Power BI report

In Power BI Desktop or the Fabric portal, create a report using an existing semantic model and connect to sales. Use the region dimension and Total Revenue measure in a visual. Desktop supports Connect to this generated model, not remote Edit.

Learn more about model definitions and TMDL.

Fabric data agent

Open your data agent, select Add data source, and choose the generated sales semantic model. Test a question such as “What is total revenue by region?” and compare its numeric answer to the DAX table.

Explore Fabric data agent capabilities.

Sharing isn’t automatic: model permissions are inherited from the parent Lakehouse. A user needs the appropriate Lakehouse Read permission and underlying table access through OneLake security or ReadAll as applicable. Report recipients also need report access. Validate with a real restricted user, not only the author.

Semantic view vs Power BI semantic model: which should you choose?

QuestionSemantic view (preview)Directly authored semantic model
Where does authoring happen?YAML definition beside Lakehouse data in ContextPower BI / Fabric modeling interfaces and supported tools
What executes DAX?Generated read-only Direct Lake on OneLake modelThe authored model itself
Can I reuse logic across Lakehouses?Yes, selected definitions through OneLake shortcuts, then local publishModel reuse follows semantic-model sharing and connection approaches
Can I edit generated measures in Desktop?No; change YAML and publishSupported through normal model authoring paths
Storage-mode/source flexibility?Lakehouse-backed Direct Lake on OneLake in previewWider supported options such as Import and DirectQuery
Advanced features?Limited preview syntax; no XMLA on generated modelChoose direct authoring for calculation groups, broader modeling and XMLA tooling where supported
Git/deployment pipelines?Not supported for semantic views or their generated models in previewSupported scenarios depend on the model and workspace configuration

When the semantic view is useful: you want a lightweight, lakehouse-local, portable business definition, shared across analytics teams or agents. When an ordinary semantic model is better: you need sophisticated BI features, a broader data-source choice, existing XMLA/TMDL editing workflows, or established CI/CD deployment processes.

For deeper reading, see our Power BI calculation groups, row-level security, and Fabric vs Power BI guides.

Reuse a semantic view in another Lakehouse

The key benefit is the ability to reuse the definition rather than duplicate a report or rewrite a metric in several models. Put a OneLake shortcut to the source view folder under Context/Semantic Views in the consuming Lakehouse. That Lakehouse must already have compatible local tables and columns. Publish the shortcut-based view in the consuming Lakehouse to create its own generated semantic model.

You can also keep schema and metrics in separate subfolders so a regional Lakehouse reuses the shared metrics subfolder but supplies its own dataset and relationship definitions. Every referenced metric, dataset and relationship must resolve in the combined local view. A shortcut does not silently copy source data or bypass permissions.

Critical update rule: changing the central YAML does not automatically republish every consumer’s model. Each consuming team must republish its view after shared definition changes. Check downstream usage before altering metric semantics.

Read the official reuse walkthrough and our OneLake Shortcuts guide before rolling this into multiple Lakehouses.

Troubleshoot your semantic view

Choose the symptom you see. This local selector is a guide to the likely next check; it does not connect to your Fabric tenant or alter any settings.

Common failure patterns

Publish says the table or column does not exist

Verify the Lakehouse is schema enabled and the source table is in the declared schema. For example, source: dbo.factsales must be a real Lakehouse table. Relationships reference dataset aliases and exact column names, not a SQL query or a report field alias.

Metrics are missing after publish

Each published metric needs a nonempty DAX dialect expression. A metric specified only in ANSI SQL can be omitted with a warning. Check the publish report, not only whether the command completed. The ai_context and custom extension properties are not mapped into the generated model in this preview.

A YAML file was ignored

Only files ending in .yaml are included. Files ending in .yml are ignored without warning. A semantic view supports up to 20 YAML files, 16 MB combined definition size and 30 MB generated TMDL.

The generated model has different names or filters

The folder name becomes the generated model name. Dataset name becomes the model table alias. The dimension key on the one side must be unique; only single-column relationships are supported and ambiguous paths should be avoided.

A user can see model metadata but not data

Model Read/Build access and OneLake underlying table access are distinct checks. Lakehouse Read grants generated-model Read and Build, but querying requires the applicable data access. Also note that Context doesn’t support OneLake security; avoid publishing sensitive business definitions or secrets into shared YAML.

Deleting or renaming a view broke reports

Deleting YAML does not automatically remove the generated model. Renames don’t synchronize source folders and the generated model. Restoring a deleted model by republishing creates a new model and won’t restore old report connections. Coordinate deletions and follow Microsoft’s cleanup steps.

Preview limits, security and costs to know before production

  • Scope: Lakehouse only, supported YAML constructs and DAX metrics. The format is based on Apache Ossie, but not every Ossie property is applied by Fabric.
  • CI/CD: no Git integration or deployment pipelines for semantic views and generated models in this preview. Avoid using a workspace connected to these lifecycle features for the tutorial.
  • Model editing: generated model is read-only; XMLA access (including read-only), Desktop remote editing and ontology creation from it are unsupported.
  • Security: check Lakehouse permissions, underlying OneLake data roles, and OLS metadata warnings. Source definitions in Context should not contain secrets or sensitive information.
  • Publishing: be mindful of name conflicts, simultaneous publishers and incomplete YAML files. Publishing doesn’t lock files while reading them.
  • Costs: no separate semantic-view meter. Definition files use OneLake storage; generated Direct Lake model queries consume existing query meters.

The model inherits Lakehouse permissions, but a generated model should still be tested with the actual user permissions that will access reports or agents. Treat this as a preview pilot until your governance, access and release controls satisfy the documented limitations.

Video walkthroughs and visual references

These English-language videos explain related semantic-model and Fabric IQ ideas. They do not demonstrate the newly released semantic-view YAML publishing workflow. For the exact steps, use the illustrated tutorial above and Microsoft’s live documentation.

Fabric Insider: the evolution of semantic models

Fabric Insider discussion with Microsoft's Power BI product team
Fabric IQ and the future of semantic models

RADACAD discussion with a Microsoft Power BI product leader about the semantic layer and AI. Background concepts, not an exact November semantic-view tutorial.

Watch on YouTube

Create a regular Fabric semantic model

Pragmatic Works demonstration of creating a Power BI semantic model in Fabric
Traditional semantic model setup in Fabric

Pragmatic Works demonstrates standard semantic-model relationships and reporting, useful for comparing the new YAML view with direct model authoring.

Watch on YouTube

For actual portal screenshots of the released semantic-view experience, use Microsoft’s illustrated tutorial. The diagrams in this article are original explanatory illustrations, not copied interface screenshots.

Frequently asked questions

Where do I create relationships in Fabric Semantic Views?

Create them under relationships in your view’s YAML files under Context/Semantic Views/<view>/. Publish the view to generate the model relationships. The model view under SystemContext is for inspection, not editing.

Is a semantic view the same as a semantic model?

No. The semantic view is the reusable definition. Publishing generates a read-only Direct Lake on OneLake semantic model that reports and agents query. Regular semantic models provide much broader authoring capabilities.

Can I use a semantic view in Power BI Desktop?

Yes. Connect to the generated semantic model for report authoring. Editing the generated model directly from Desktop isn’t supported in this preview.

Can semantic views reuse definitions across Lakehouses?

Yes, using OneLake shortcuts to the view definition folders or subfolders. Referenced tables must exist in the consuming Lakehouse, which must publish its own view and model.

Does Semantic Views replace calculation groups or TMDL?

No. The current preview does not provide complete Power BI semantic-model authoring. Use a directly authored model for advanced features and existing XMLA tooling. The generated output is TMDL but is read-only.

Do I need to pay for semantic views separately?

No dedicated semantic-view meter is documented. OneLake file storage and Direct Lake model queries consume their existing Fabric resources and meters.

Official documentation and next steps

This article is based on Microsoft documentation reviewed on 24 November 2026. The YAML and DAX follow Microsoft’s published sample and expected results, but haven’t been executed in a live customer Fabric tenant for this article. Verify the current preview status before a production decision.

Continue with a related UltimateInfoGuide guide

Scroll to Top