Sub topic 1
What a semantic model does and why storage mode matters
Prerequisites
This chapter assumes you can:
- Connect to data and build a model and report in Power BI Desktop.
- Read a star schema (fact and dimension tables) and understand relationships.
- Write a basic DAX measure.
- Read simple SQL.
Knowing what Microsoft Fabric and workspaces are helps later, when we reach Direct Lake. It is not needed here.
What a semantic model does
A semantic model is the layer between your data sources and your reports. It holds the tables, relationships, measures, hierarchies, and security rules that report authors reuse. Reports, dashboards, Excel pivot tables, and other tools send queries to the model. They do not query the source directly.
The model does three jobs:
- It describes the business meaning of the data, such as "Total Sales" or "Customer".
- It answers queries written in DAX (Data Analysis Expressions). Report visuals generate these queries for you.
- It applies security, such as row-level security, before returning results.
Where the model gets its data, and where it keeps it, is decided by the storage mode.
What a storage mode is
A storage mode is a table-level property. It tells the model how to get the rows for that table when a query needs them. Each table has its own mode, so one model can mix modes.
You set it in Power BI Desktop in Model view. Select a table, then open the Properties pane and choose a value under Advanced, Storage mode. In Fabric, the Direct Lake mode is chosen when you create the model over Delta tables.
The modes are:
| Mode | Where the data is when a query runs |
|---|---|
| Import | Copied into the model's memory ahead of time |
| DirectQuery | Left at the source and queried each time |
| Direct Lake | Delta files in OneLake, with columns loaded into memory on demand |
| Dual | Either, depending on the query |
Later chapters cover each mode in turn.
Why the choice matters
The same measure can behave very differently under each mode. Consider this one:
Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[UnitPrice] )The DAX is identical in every mode. What changes is who does the work:
- With Import or Direct Lake, the in-memory VertiPaq engine computes the result.
- With DirectQuery, the model translates the query into SQL and sends it to the source database. The source does the work.
That difference affects five things you will compare throughout this tutorial:
- Freshness: how current the numbers are.
- Query speed: how fast visuals respond.
- Refresh time and capacity: the cost of loading data and holding it in memory.
- Source load: how much traffic your database receives from report users.
- Feature limits: which DAX and Power Query features still work.
A first look at the trade-off
Suppose a sales table has 500 million rows and the business wants dashboards that update every few minutes.
- Import gives fast visuals, but the table must fit in memory and each refresh copies the data again.
- DirectQuery gives fresh data without a copy, but every visual waits on the source database.
- Direct Lake aims for Import-like speed over data that already sits in OneLake, without a separate copy step.
No mode wins everywhere. The rest of the tutorial gives you the working model of each one so you can choose deliberately.
Exercise
A colleague says "we changed the DAX measure, so the report will be as fast as before in DirectQuery." Why might this be wrong?
Show answer
In DirectQuery the measure is translated into SQL and run by the source, so speed depends on the source database and the generated query. In Import or Direct Lake, VertiPaq runs it in memory. The same DAX can perform very differently depending on storage mode.
Exercise
At what level is the storage mode set: the whole model, or each table?
Show answer
Each table has its own storage mode, which is why one model can combine Import, DirectQuery, and Dual tables.