Home|Blog|Import vs DirectQuery in Power BI: The Decision That Determines Your Report's Destiny
Sign in →
power-bi
directquery
import-mode
composite-model
architecture

Import vs DirectQuery in Power BI: The Decision That Determines Your Report's Destiny

By Shashikant·18 July 2026·4 min read

Introduction

Of all the architectural decisions in Power BI, Import vs DirectQuery has the highest long-term consequences. Get it wrong and you'll spend months fighting performance problems that no DAX optimization can fix. Get it right and your report architecture scales naturally with your data.

Most tutorials explain what each mode does. Few explain the tradeoffs honestly. This one does.


Core Concept: Two Fundamentally Different Architectures

Import Mode
Data is extracted from the source, compressed into VertiPaq's in-memory columnar store, and stored inside the .pbix file (or in the cloud dataset). When a visual renders, Power BI queries its own in-memory copy. Refresh is a batch process - typically scheduled hourly, daily, or triggered manually.

This is the default. This is what 90% of Power BI implementations should use.

DirectQuery Mode
No data is stored in Power BI. Every visual generates a query that is sent to the source database in real time. When a user clicks a slicer, Power BI sends a SQL (or equivalent) query to the source and waits for a response.

This sounds better. It usually isn't.


Real-World Application: When DirectQuery Goes Wrong

A fintech startup chose DirectQuery because their CFO wanted "real-time data." Their source was a PostgreSQL database with 80 million rows.

On day one: the report opened in 12 seconds. Acceptable.
After 3 months: 45 seconds.
After 6 months: 2-3 minutes.
After 1 year: the DBA added indexes specifically for Power BI queries because the dashboard was impacting production database performance.

The real-time requirement? The CFO checked the dashboard once a day in the morning. A scheduled Import refresh every 4 hours would have served them identically - with millisecond response times.

DirectQuery created a production database dependency, a performance ceiling, and an operational burden. Import mode, with a modest refresh schedule, would have been invisible.


Technical Deep Dive: The Tradeoff Matrix

DimensionImportDirectQuery
Query speedMilliseconds (in-memory)Seconds to minutes (network + source DB)
Data freshnessAs fresh as last refreshReal-time
DAX supportFull DAX language~70% of DAX supported
Dataset size limit1 GB (Pro) / 100 GB (Premium)Unlimited
Source database loadNone after refreshEvery visual interaction
Offline availabilityYes (cached)No
Time intelligenceFull (with Date table)Limited
Calculated tablesSupportedNot supported

The hidden cost of DirectQuery: DAX restrictions. Several DAX functions - SUMMARIZECOLUMNS with certain filters, calculated tables, many time intelligence patterns - don't work in DirectQuery. Senior developers who learn DAX in Import mode then inherit a DirectQuery model spend weeks discovering which patterns are unavailable.


When DirectQuery Is Actually the Right Answer

Despite the warnings, DirectQuery is the correct choice in specific scenarios:

  1. Data exceeds the Import size limit - datasets over 1 GB (or 100 GB in Premium) can't be fully imported
  2. Regulatory compliance requires no data copy - some industries prohibit storing data outside the source system
  3. Sub-minute freshness is genuinely required - trading floors, live operations dashboards
  4. Source data changes continuously - IoT sensor streams, live transaction feeds

In all other cases, Import with a scheduled refresh is almost always superior.


Composite Models: The Best of Both Worlds

Since Power BI Desktop 2.80, Composite Models allow mixing Import and DirectQuery tables in the same model. The pattern:

  • Large, slow-changing dimension tables (Products, Customers, Geography) → Import
  • Large, fast-changing fact tables → DirectQuery
  • Small lookup tables → Import

This gives you real-time fact data (order status, live inventory) with fast filter performance from in-memory dimensions. The combination resolves most "I need real-time but Import is too slow" conflicts.

[Customers - Import] ──→ [Orders - DirectQuery] ←── [Products - Import]
                                    ↑
                         [Date Table - Import]

Common Mistakes

Choosing DirectQuery because it "sounds more advanced." DirectQuery is not more professional than Import. It is a specialized tool for specific constraints. Using it without those constraints is architectural debt.

Not testing DirectQuery performance under concurrent users. A DirectQuery report that opens in 4 seconds for one user may take 40 seconds for 20 concurrent users, because every user generates independent database queries. Import mode serves all users from the same in-memory cache.

Assuming DirectQuery bypasses the dataset size limit. The size limit applies to the model definition - relationships, measures, metadata. DirectQuery tables don't add to the size limit, but your model can still grow large from calculated tables, Import tables in composite models, and metadata.


Pro Tips / Industry Insight

The Aggregation Tables feature in Power BI (available in composite models) is the production pattern for large-scale DirectQuery: build pre-aggregated Import tables for the most common query patterns (daily totals, regional summaries), and fall back to DirectQuery only for granular drill-through. Power BI automatically routes queries to the aggregation table or the source based on granularity.

This is how enterprises like Walmart and HDFC Bank run Power BI over billion-row datasets - not pure Import, not pure DirectQuery, but a hybrid with aggregations.


Summary

Import mode is the correct default: fast, full DAX, predictable refresh cost. DirectQuery is for specific constraints - size limits, compliance, genuine real-time requirements. Composite models bridge the gap. The decision is architectural and expensive to change later - make it deliberately, with a clear understanding of the tradeoffs, before building anything.

Prove your understanding of Power BI architecture with a live DRI score at devwithdata.in.

DevWithData

Shashikant

· Founder, DevWithData

Data professional and Power BI instructor. Building DevWithData to help analysts prove their skills, not just collect certificates.

Reading is not enough. Prove your skill.

DevWithData measures your actual ability with the Data Readiness Index. Stop reading — start practicing.

Continue Learning