Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Getting Data In  ›  Lesson

Import Mode vs DirectQuery

Import Mode 13 minImport copies compressed data into the model for fast, full-featured reports that are as fresh as the last refresh, while DirectQuery sends a query to the source on every interaction.

Import Mode vs DirectQuery

Meera loves how fast the Weekly Sales report opens, but at 3 p.m. it still shows the numbers from the 7 a.m. refresh. Meanwhile the kitchen manager wants a screen of online orders placed in the last five minutes. Both requests trace back to a single choice made when you connect to a source: the storage mode.

The rule

Import copies the data for speed; DirectQuery asks the source every time.

Import. At each refresh, Power BI copies the data into the model and compresses it in a fast in-memory column store (the VertiPaq engine). Visuals read that copy, so they respond quickly, and every Power Query and DAX feature is available. The price: the data is only as fresh as the last refresh — up to 8 scheduled refreshes a day on Pro, 48 on PPU or a capacity — and the model counts against size limits, 1 GB per model on Pro.

DirectQuery. Only the table structure is stored. Each time someone opens a page, moves a slicer or changes a filter, Power BI turns the visual's request into a query and sends it to the source. The numbers are as current as the source, and the data can be far bigger than any model. The price: every click waits for the source, the source carries the load, some Power Query steps and DAX functions are restricted, and a single query may return at most about a million rows to Power BI.

Import DirectQuery
Data stored in the model Yes, compressed No
Freshness As of the last refresh At the moment of the click
Speed Fastest As fast as the source
Size Limited by the model size limit Limited by the source
Features Everything Some restricted

A table can later be switched from DirectQuery to Import, but a table set to Import cannot be switched back. Decide deliberately.

The shortcut

Default to Import. Move to DirectQuery only if one of two questions forces it: Must the data be fresher than a few refreshes a day allow? Is it too big to copy? If both answers are no, stay with Import.

Two reports, two answersStep 1 of 4
  1. Weekly Sales

    Three years of till lines, about two million rows. Hourly freshness is not needed, and the data fits easily. Import.

The common mistake is choosing DirectQuery "to be safe" for a report that would be happy with Import. The report becomes slower for everyone, and the source database pays for every click.

Drills

Answer fast — trust the rule.

quick drill

In which mode does the model hold a compressed copy of the data?

quick drill

A user moves a slicer on a DirectQuery page. What happens?

quick drill

Which need most clearly calls for DirectQuery?

quick drill

Arjun set the Stores table to Import and now wants it in DirectQuery. What can he do?

quick drill

An Import model on Pro must show fresh numbers at 7 a.m., 11 a.m., 3 p.m. and 7 p.m. Can scheduled refresh do that?

Remember

  • Import copies the data for speed; DirectQuery asks the source every time.
  • Default to Import; switch only when freshness or size forces you.
  • Trap: DirectQuery "to be safe" makes every click slower, and setting a table to Import is one-way.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainFast report, live screen

Meera wants the Weekly Sales report to stay fast, and the kitchen wants a screen of orders from the last five minutes. Explain which storage mode fits each report and what each choice costs.