Wicked Smart Data
LearnArticlesAbout
Sign InSign Up
LearnArticlesAboutContact
Sign InSign Up
Wicked Smart Data

The go-to platform for professionals who want to master data, automation, and AI — from Excel fundamentals to cutting-edge machine learning.

Platform

  • Learning Paths
  • Articles
  • About
  • Contact

Connect

  • Contact Us
  • RSS Feed

© 2026 Wicked Smart Data. All rights reserved.

Privacy PolicyTerms of Service
All Articles
Composite Models and DirectQuery: When to Use Which in Power BI

Composite Models and DirectQuery: When to Use Which in Power BI

Power BI🌱 Foundation14 min readMay 6, 2026Updated May 6, 2026
Table of Contents
  • Prerequisites
  • Understanding the Three Storage Modes
  • Import Mode: Your Data's Local Copy
  • DirectQuery: Live Connections
  • Composite Models: The Best of Both Worlds
  • When DirectQuery Makes Sense
  • Large, Fast-Growing Datasets
  • Real-Time Operational Dashboards
  • Regulatory and Compliance Requirements
  • When Import Mode is Better
  • Performance is King
  • Complex Data Modeling
  • Unreliable Source Systems

Imagine you're building a Power BI dashboard for your company's quarterly business review. Your sales data lives in SQL Server (50 million rows and growing daily), your marketing campaign data sits in Google Analytics, and your financial targets are in an Excel spreadsheet that your CFO updates monthly. How do you bring all this together into a single, performant report without breaking your data warehouse or creating hour-long refresh cycles?

This is where understanding composite models and DirectQuery becomes crucial. These aren't just technical features—they're strategic decisions that determine whether your Power BI solution scales gracefully or becomes a maintenance nightmare. By the end of this lesson, you'll know exactly when to use each approach and how to combine them effectively.

What you'll learn:

  • The fundamental differences between Import, DirectQuery, and Composite models
  • How to evaluate data sources to choose the optimal storage mode
  • When DirectQuery solves real business problems (and when it creates new ones)
  • How to design composite models that balance performance with real-time requirements
  • Common pitfalls and how to avoid them when implementing these architectures

Prerequisites

You should be comfortable with basic Power BI desktop functionality, including connecting to data sources and creating simple visualizations. Familiarity with basic database concepts (tables, relationships, queries) will be helpful but not required.

Understanding the Three Storage Modes

Before diving into when to use what, let's establish clear definitions of Power BI's three storage modes. Think of these as different strategies for handling your data, each with distinct trade-offs.

Import Mode: Your Data's Local Copy

Import mode downloads and stores data directly in your Power BI dataset. When you refresh your dataset, Power BI executes queries against your source systems, pulls the results into its internal storage engine (called VertiPaq), and compresses the data for fast retrieval.

This is like downloading movies to your laptop before a flight. Everything you need is stored locally, so playback is instant and smooth, but you're limited by storage space and the movies are only as current as your last download.

DirectQuery: Live Connections

DirectQuery maintains a live connection to your source system. Instead of importing data, Power BI translates your visual interactions into SQL queries and sends them to the source database in real-time. The data you see is always current, but performance depends entirely on your source system's responsiveness.

This is like streaming movies from Netflix. You always get the latest content, but your experience depends on your internet connection and Netflix's server performance.

Composite Models: The Best of Both Worlds

Composite models let you mix Import and DirectQuery within the same dataset. You might import your relatively static dimension tables (products, customers, territories) while keeping large fact tables (sales transactions, web logs) in DirectQuery mode.

This is like downloading your favorite series episodes while streaming new releases—you get instant access to frequently-used content and real-time access to everything else.

When DirectQuery Makes Sense

DirectQuery isn't always the right choice, but it solves specific business problems elegantly. Let's explore the scenarios where DirectQuery provides clear advantages.

Large, Fast-Growing Datasets

Consider a retail company tracking website clickstreams. They generate 10 million events daily, and the marketing team needs to analyze user behavior patterns in near real-time. Importing 3+ billion annual events into Power BI would create massive datasets and extremely long refresh times.

DirectQuery shines here because:

  • Data freshness is critical for marketing decisions
  • The source database (likely a modern data warehouse) is optimized for analytical queries
  • Storage costs in Power BI would be prohibitive for this volume

Real-Time Operational Dashboards

Manufacturing companies often need dashboards showing current production status, quality metrics, and equipment performance. A factory floor manager checking production status at 2 PM needs data from 2 PM, not from the last scheduled refresh at 8 AM.

DirectQuery works well for operational dashboards when:

  • Decision-making depends on the latest data
  • Source systems can handle the query load
  • Users understand that complex visuals may take longer to load

Regulatory and Compliance Requirements

Financial institutions often face regulations requiring that reports reflect data "as of" specific timestamps. If an audit requires transaction data as it existed at market close on a particular day, importing data introduces risk—what if someone accidentally refreshes with updated data?

DirectQuery provides audit-trail benefits because:

  • Queries execute against the system of record
  • Data lineage is clear and verifiable
  • Historical point-in-time queries remain possible

When Import Mode is Better

Import mode remains the best choice for most Power BI scenarios. Understanding why helps you make informed architecture decisions.

Performance is King

Power BI's VertiPaq engine is extraordinarily fast at aggregating imported data. A typical sales analysis that might take 30 seconds against a SQL Server database completes in milliseconds with imported data.

Import mode excels when:

  • Users expect sub-second response times
  • Reports involve complex calculations across multiple tables
  • Data doesn't need to be real-time (daily or weekly freshness suffices)

Complex Data Modeling

Power BI's modeling capabilities work best with imported data. Features like calculated columns, complex measures, and advanced time intelligence functions either perform better or are only available with imported data.

Consider a sales analysis requiring:

  • Year-over-year growth calculations
  • Customer lifetime value computations
  • Product affinity analysis

These calculations are much more efficient when data is imported and compressed in VertiPaq format.

Unreliable Source Systems

Not every database is designed for analytical workloads. If your source system is:

  • An OLTP system serving live applications
  • A system with inconsistent performance
  • A database without proper indexing for analytical queries

Import mode protects both your reports and your source systems by isolating the workloads.

Designing Effective Composite Models

Composite models require thoughtful design to maximize their benefits while avoiding common pitfalls. Let's walk through a practical example.

Scenario: Retail Chain Analysis

Imagine you're building analytics for a retail chain with:

  • Products table: 50,000 items, updated monthly
  • Stores table: 500 locations, rarely changes
  • Sales table: 100 million transactions yearly, growing by 300,000 daily
  • Inventory table: Real-time stock levels, critical for operations

Here's how to approach the storage mode decisions:

Import candidates (Products and Stores):

  • Relatively small datasets
  • Infrequent changes
  • Used in almost every analysis
  • Rich with descriptive attributes needed for filtering and grouping

DirectQuery candidates (Sales and Inventory):

  • Large, fast-growing datasets
  • Freshness requirements vary by use case
  • Well-structured for efficient querying

Implementation Strategy

Start by importing your dimension tables. In Power BI Desktop:

  1. Connect to your Products table
  2. Navigate to Model view
  3. Select the Products table
  4. In the Properties pane, verify Storage Mode is set to Import
  5. Repeat for Stores table

For your fact tables, configure DirectQuery:

  1. Connect to your Sales table using the same data source
  2. In Model view, select the Sales table
  3. Change Storage Mode to DirectQuery
  4. Power BI will prompt to convert your dataset to Composite mode—click Yes

Relationship Considerations

Cross-source relationships in composite models require careful attention. When you relate an imported dimension table to a DirectQuery fact table, Power BI must send dimension filter values to the source database.

For example, filtering by Product Category in your imported Products table requires Power BI to:

  1. Identify which Product IDs belong to the selected categories
  2. Generate a SQL query that filters Sales to those Product IDs
  3. Execute the query against your source database

This works well when dimension tables are reasonably sized, but performance degrades with very large dimension tables or complex filter scenarios.

DirectQuery Limitations and Workarounds

DirectQuery comes with significant constraints that you must understand before implementation.

Calculation Limitations

Many DAX functions don't work in DirectQuery mode. Functions that require iterating over large datasets (like RANKX or complex time intelligence functions) either fail or perform poorly.

Workaround strategies:

  • Push complex calculations to your source database as computed columns or views
  • Use Import mode for tables requiring advanced calculations
  • Implement calculations in your ETL process rather than in Power BI

Performance Considerations

Every visual interaction triggers SQL queries to your source database. Users accustomed to instant responses may find DirectQuery reports sluggish, especially with:

  • Complex joins across multiple tables
  • Filters applied to non-indexed columns
  • Aggregations over large date ranges

Optimization techniques:

  • Ensure proper indexing on columns used in reports
  • Limit the number of visuals per report page
  • Use summary tables or aggregations at the database level
  • Implement query folding where possible

Source System Impact

DirectQuery reports can significantly impact source database performance. A popular dashboard might generate hundreds of concurrent queries during peak usage.

Protection strategies:

  • Implement query governors or resource limits
  • Use read replicas or data warehouse systems rather than operational databases
  • Monitor query patterns and optimize accordingly
  • Consider caching strategies at the database level

Common Mistakes and Troubleshooting

Learning from typical implementation mistakes saves time and frustration.

Mistake 1: Using DirectQuery for Small, Static Data

New Power BI developers sometimes default to DirectQuery thinking it's "more advanced" or provides better data freshness. Using DirectQuery for a 1,000-row customer table that updates monthly creates unnecessary complexity with no benefits.

Solution: Import small, relatively static tables unless you have specific real-time requirements.

Mistake 2: Ignoring Query Folding

Query folding determines whether Power BI can push transformations down to the source database. When query folding fails, Power BI must pull raw data and transform it locally, defeating DirectQuery's purpose.

Troubleshooting steps:

  1. Review your query steps in Power Query Editor
  2. Look for steps marked with warning icons
  3. Simplify transformations or move them to database views
  4. Test query performance using SQL Server Profiler or similar tools

Mistake 3: Inadequate Source Database Performance

DirectQuery success depends entirely on source database performance. Using DirectQuery against an OLTP system without proper indexing creates poor user experiences.

Performance checklist:

  • Verify indexes exist on all columns used in relationships
  • Test query performance during peak usage periods
  • Monitor database resource utilization
  • Consider columnstore indexes for large fact tables

Mistake 4: Mixing Security Models

Composite models can create complex security scenarios. If your imported dimension tables have different security requirements than your DirectQuery fact tables, you may inadvertently expose sensitive data.

Security best practices:

  • Implement row-level security consistently across all tables
  • Document data classification and access requirements
  • Test security with different user roles
  • Consider using database-level security for DirectQuery tables

Hands-On Exercise

Let's practice with a realistic scenario. You'll create a composite model combining sales performance data (DirectQuery) with product information (Import).

Setup Instructions

  1. Download sample data: Use the AdventureWorks sample database or create CSV files with:

    • Products: ProductID, ProductName, Category, SubCategory (500 rows)
    • Sales: SalesID, ProductID, OrderDate, SalesAmount, Quantity (50,000+ rows)
  2. Create the composite model:

    • Open Power BI Desktop
    • Click Get Data → SQL Server (or Text/CSV for sample files)
    • Import the Products table first
    • Connect to Sales data using the same source
    • When prompted about storage mode, choose DirectQuery for Sales
    • Allow Power BI to create a composite model
  3. Configure relationships:

    • Switch to Model view
    • Create a relationship between Products[ProductID] and Sales[ProductID]
    • Verify the relationship shows Import to DirectQuery connectivity
  4. Build test visuals:

    • Create a bar chart showing Sales Amount by Product Category
    • Add a slicer for Product SubCategory
    • Notice how filtering dimensions affects DirectQuery performance
  5. Monitor query behavior:

    • Use Performance Analyzer (View tab → Performance Analyzer)
    • Interact with your visuals and observe query execution times
    • Compare performance with different filter combinations

Expected Results

You should observe:

  • Quick response times when filtering by product attributes (imported data)
  • Slower responses when applying complex filters across large date ranges
  • SQL queries generated for each visual interaction with sales data

Performance Optimization Strategies

Optimizing composite and DirectQuery models requires understanding the entire data pipeline, not just Power BI configuration.

Database-Level Optimizations

Start with your source database. Even the best Power BI model can't overcome poor database performance.

Indexing strategy:

  • Create covering indexes for common query patterns
  • Index all foreign key columns used in relationships
  • Consider columnstore indexes for large fact tables
  • Monitor index usage and remove unused indexes

Query optimization:

  • Review generated SQL using SQL Server Profiler
  • Identify expensive operations like table scans
  • Consider database views for complex joins
  • Implement summary tables for common aggregations

Power BI Model Optimizations

Several Power BI configuration options significantly impact performance.

Relationship optimization:

  • Use integer keys rather than string keys where possible
  • Minimize the number of relationships crossing storage modes
  • Consider denormalizing dimension data when appropriate
  • Use bidirectional relationships sparingly

Measure design:

  • Prefer simple aggregations (SUM, COUNT) over complex calculations
  • Use variables in DAX measures to improve readability and performance
  • Implement time intelligence at the database level when possible
  • Cache expensive calculations in calculated columns when appropriate

User Experience Considerations

Set appropriate expectations with your users about DirectQuery performance characteristics.

Dashboard design principles:

  • Limit the number of visuals per page to reduce concurrent queries
  • Use summary-level visuals rather than detailed transaction views
  • Implement drill-through pages for detailed analysis
  • Consider using bookmarks for common filter combinations

When to Use Each Approach: Decision Framework

Use this decision framework to systematically evaluate storage mode choices for your datasets.

Start with These Questions

Data Volume and Growth:

  • How large is the dataset today?
  • How quickly is it growing?
  • What's the expected size in 12 months?

Freshness Requirements:

  • How current must the data be for decision-making?
  • Can users work with data that's hours or days old?
  • Are there regulatory requirements for real-time data?

Source System Capabilities:

  • Is the source optimized for analytical queries?
  • What's the current query performance baseline?
  • How will additional analytical load impact operational systems?

User Experience Expectations:

  • Do users require sub-second response times?
  • How complex are the typical analytical scenarios?
  • What's the user's tolerance for longer load times?

Decision Matrix

Scenario Recommended Approach Justification
Small datasets (<1GB), weekly refresh acceptable Import Maximum performance, full feature set
Large datasets (>10GB), real-time required DirectQuery Storage efficiency, data freshness
Mixed requirements: small dimensions, large facts Composite Balanced performance and freshness
Complex calculations, moderate size Import Full DAX capabilities, predictable performance
Operational dashboards, simple visuals DirectQuery Real-time data, acceptable performance trade-off

Summary and Next Steps

Choosing between Import, DirectQuery, and Composite models isn't just a technical decision—it's a strategic choice that impacts user experience, system performance, and maintenance overhead. Import mode provides the best performance and full feature access but requires careful data volume management. DirectQuery offers real-time data access at the cost of performance and functionality limitations. Composite models provide flexibility but require thoughtful design to avoid complexity pitfalls.

The key is matching your storage strategy to your specific business requirements. Start with Import mode for most scenarios, consider DirectQuery when real-time data is crucial and your source systems can handle the load, and use Composite models when you need the benefits of both approaches.

Your next steps:

  1. Audit your current Power BI datasets to identify optimization opportunities
  2. Practice building composite models with your own data sources
  3. Learn about query optimization techniques for your specific database platform
  4. Explore Power BI's premium features like incremental refresh and aggregations that can extend Import mode capabilities

Understanding these storage modes opens the door to more advanced Power BI architectures. Consider exploring incremental refresh strategies, which can help Import mode handle larger datasets, or aggregations, which can boost DirectQuery performance through intelligent caching.

Learning Path: Enterprise Power BI

Previous

Power BI Dataflows: Centralized ETL for the Enterprise

Next

Power BI Governance: Workspaces, Permissions, and Audit Logging

Related Articles

Power BI⚡ Practitioner

Monitoring Power BI Performance with Premium Metrics: A Complete Guide to Proactive Optimization

17 min
Power BI🌱 Foundation

Monitoring Power BI Premium Performance with Premium Metrics

15 min
Power BI🔥 Expert

Power BI REST API: Automate Administration and Deployments

29 min

On this page

  • Prerequisites
  • Understanding the Three Storage Modes
  • Import Mode: Your Data's Local Copy
  • DirectQuery: Live Connections
  • Composite Models: The Best of Both Worlds
  • When DirectQuery Makes Sense
  • Large, Fast-Growing Datasets
  • Real-Time Operational Dashboards
  • Regulatory and Compliance Requirements
  • When Import Mode is Better
  • Performance is King
  • Designing Effective Composite Models
  • Scenario: Retail Chain Analysis
  • Implementation Strategy
  • Relationship Considerations
  • DirectQuery Limitations and Workarounds
  • Calculation Limitations
  • Performance Considerations
  • Source System Impact
  • Common Mistakes and Troubleshooting
  • Mistake 1: Using DirectQuery for Small, Static Data
  • Mistake 2: Ignoring Query Folding
  • Mistake 3: Inadequate Source Database Performance
  • Mistake 4: Mixing Security Models
  • Hands-On Exercise
  • Setup Instructions
  • Expected Results
  • Performance Optimization Strategies
  • Database-Level Optimizations
  • Power BI Model Optimizations
  • User Experience Considerations
  • When to Use Each Approach: Decision Framework
  • Start with These Questions
  • Decision Matrix
  • Summary and Next Steps
  • Complex Data Modeling
  • Unreliable Source Systems
  • Designing Effective Composite Models
  • Scenario: Retail Chain Analysis
  • Implementation Strategy
  • Relationship Considerations
  • DirectQuery Limitations and Workarounds
  • Calculation Limitations
  • Performance Considerations
  • Source System Impact
  • Common Mistakes and Troubleshooting
  • Mistake 1: Using DirectQuery for Small, Static Data
  • Mistake 2: Ignoring Query Folding
  • Mistake 3: Inadequate Source Database Performance
  • Mistake 4: Mixing Security Models
  • Hands-On Exercise
  • Setup Instructions
  • Expected Results
  • Performance Optimization Strategies
  • Database-Level Optimizations
  • Power BI Model Optimizations
  • User Experience Considerations
  • When to Use Each Approach: Decision Framework
  • Start with These Questions
  • Decision Matrix
  • Summary and Next Steps