Sub topic 2
Storage modes: Import, DirectQuery, Direct Lake, and Dual
This chapter assumes you can build a basic star schema in Power BI Desktop, write simple DAX measures, and read a SQL query. You do not need Fabric experience yet.
What a storage mode is
A storage mode is a table property that tells the semantic model where the table's data lives when a report queries it. Each table in a model has its own storage mode. A model can therefore mix modes, which later chapters use for composite models.
The mode decides four things: whether the data is copied, when it is read, which engine answers the query, and how fresh the answer is.
The four modes
| Mode | Where the data lives | When data is read | Engine that answers |
|---|---|---|---|
| Import | Copy inside the model | At refresh | VertiPaq |
| DirectQuery | Source system only | At every query | Source database |
| Direct Lake | Delta tables in OneLake | On demand, as columns are needed | VertiPaq |
| Dual | Copy in the model and the source | Refresh, plus at query time if needed | VertiPaq or source |
Import copies the data into the model during refresh. Queries run against the in-memory copy, so they are fast. The data is only as new as the last refresh.
DirectQuery keeps no copy of the data. When a visual renders, the model translates the DAX query into a query in the source's language, usually SQL, and sends it to the source. Data is current, but speed depends on the source, and some DAX and Power Query features are limited.
Direct Lake is available for Fabric semantic models. The model reads Delta tables stored in OneLake and loads the columns a query needs into memory. There is no separate copy step like Import refresh. Later chapters cover framing and fallback to DirectQuery.
Dual is a mode for tables in a composite model. A Dual table can act as Import or as DirectQuery, depending on the query. This avoids slow cross-source joins between a table in one mode and a table in another.
Where you set the mode
In Power BI Desktop, open Model view, select a table, and open Properties. The Advanced section holds the Storage mode setting. When you first connect to a relational source, Desktop asks you to pick Import or DirectQuery. Switching a table from DirectQuery to Import is allowed. Switching from Import to DirectQuery is not.
Seeing the difference in a measure
The same measure runs in every mode. The engine that executes it changes.
Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[UnitPrice] )With Import or Direct Lake tables, VertiPaq evaluates this measure in memory. With DirectQuery tables, the model generates a SQL query that does the multiplication and sum at the source. The DAX is identical, but the cost lands on a different system.
Common mistakes
- Assuming DirectQuery is always fresher in practice. It reads current data, but cached visuals and slow sources can make reports feel stale or unresponsive.
- Treating Direct Lake as Import with no refresh. The model still needs to pick up new Delta table versions, and that happens through framing.
- Setting everything to DirectQuery for simplicity. Each visual then generates source queries, so the source carries the load of every user.
Exercise
A report uses a large Sales table in DirectQuery and a small Product table in Import. Which storage mode would you consider for Product so that filtering Sales by product does not need a cross-source join, and why?
Show answer
Dual. A Dual table can be answered from its in-memory copy when queried alongside Import tables and from the source when queried alongside DirectQuery tables, so the model can push the join to the source instead of joining across sources.