How to Change Direct Query to Import in Power BI

Cody Schneider7 min read

Building a Power BI report with DirectQuery and realizing halfway through that your visuals are agonizingly slow is a common rite of passage. If you've found that the real-time data connection isn't worth the performance hit, you're in the right place. This guide will walk you through why and how to switch your data storage mode from DirectQuery to Import for faster, more powerful reports.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

DirectQuery vs. Import: A Quick Refresher

Before changing any settings, it’s important to understand the fundamental difference between these two modes. They govern how Power BI interacts with your data source, and each comes with its own set of strengths and weaknesses.

What is DirectQuery?

DirectQuery creates a live, direct connection to your data source. When a user interacts with a report visual - like clicking a filter or a column in a chart - Power BI sends a new query directly to the source database (like a SQL server) to fetch the updated data. No data is actually copied and stored in your Power BI file (.pbix).

  • Pros of DirectQuery:
  • Cons of DirectQuery:

What is Import Mode?

Import mode, as the name suggests, extracts the data from your source and loads a compressed copy of it directly into the Power BI file. This data is held in-memory in Power BI's highly efficient VertiPaq analysis engine. This is the default and most common storage mode.

  • Pros of Import Mode:
  • Cons of Import Mode:
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Key Signs It's Time to Switch to Import Mode

If you're reading this, you probably already have a feeling you need to switch. Here are the most common situations where moving from DirectQuery to Import is the right call.

  • Your Visuals Are Lagging: The most obvious sign. If it takes several seconds for a simple bar chart to update after you click a slicer, your users will get frustrated. Speed is a feature, and Import mode is your best tool for achieving it.
  • You Need Complex Calculations: You're trying to build advanced DAX measures for time intelligence (like Year-over-Year growth), running totals, or complex new calculated tables, but you're hitting performance walls or unsupported function errors. Import mode will unlock the full power of DAX.
  • The Source Database is Overwhelmed: You got a tap on the shoulder (or a stern email) from a database administrator asking why your Power BI report is sending a thousand queries an hour to the production database. Switching to Import consolidates this activity into a single scheduled refresh.
  • Near-Real-Time Data Is "Good Enough": After a frank discussion with your report's stakeholders, you realize they don't actually need to see data from five seconds ago. An update every hour, a few times per day, or even just once daily is completely acceptable for their decision-making needs.

How to Change from DirectQuery to Import in Power BI

The good news is that making the switch is surprisingly simple. You don't have to rebuild your report from scratch. Here’s a step-by-step guide to changing the storage mode for your tables.

Step 1: Open the Model View

In Power BI Desktop, look at the icons on the left-hand side. The bottom icon, which looks like an entity-relationship diagram, is the Model view. Click it to see all of your tables and the relationships between them.

Step 2: Select the Table to Change

In the Model view canvas, click on the table you want to switch from DirectQuery to Import. When a table is in DirectQuery mode, you'll typically see a blue header bar at the top of the table card.

Step 3: Access the Properties Pane

With the table selected, look to the right-hand side for the Properties pane. If it's not visible, go to the "View" ribbon at the top of the screen and make sure "Properties" is checked.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 4: Change the Storage Mode Setting

In the Properties pane, scroll down until you see the Advanced section and expand it. The very first option you'll see here is "Storage mode." It will be set to "DirectQuery."

Step 5: Select "Import" and Apply Changes

Click the dropdown menu and select Import. Power BI will show a warning dialogue explaining that this action will have consequences, such as taking time to import the data and removing any pre-defined limitations on rows retrieved from the source. Click "OK."

Repeat this process for every table in your model that you want to switch to Import mode.

Important Considerations After Switching to Import

Once you make the change, a few things will happen that you need to be aware of.

  1. Data Loading Begins: Power BI will immediately connect to your data source and start pulling a copy of the data from the selected tables into the .pbix file. Depending on the size of the tables, this could take a few seconds or many minutes.
  2. File Size Increases: Your .pbix file, which was very small when using DirectQuery, will now grow in size since it contains a full copy of the data.
  3. Critical - You MUST Set Up a Scheduled Refresh: This is the most important step after switching. Your data is no longer live. To keep it updated, you must publish the report to the Power BI Service and configure a scheduled refresh. This tells Power BI how often to go back to the source, grab fresh data, and reload it into your model. You may also need to configure a data gateway if your source is on an on-premise network.

Tips, Tricks, and Best Practices

As you manage your report's storage, keep these advanced techniques in mind.

What About "Mixed Mode" and "Dual Mode"?

You don't have to choose one mode for your entire report. Power BI allows for a "mixed mode," where some tables are in Import mode and others are in DirectQuery. This is incredibly powerful.

  • Fact Tables in DirectQuery: You might have a massive, constantly updating sales transaction table. You can leave this multi-billion row table in DirectQuery mode.
  • Dimension Tables in Import: Your smaller "lookup" tables, like a Product list, a Customer directory, or a Date table, which don't change often, can be set to Import for maximum performance.
  • Use Dual Mode: When you have dimension tables in Import and fact tables in DirectQuery, you can set the dimension table's storage mode to Dual. This lets Power BI intelligently decide whether to use the imported, in-memory version or send a query to the source, optimizing performance automatically.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Can I Switch Back to DirectQuery?

Yes, you can. You can follow the same steps to change a table from Import back to DirectQuery. Just be aware that when you do this, Power BI will delete the imported data from the .pbix file, which will shrink its size and once again rely on live queries for all interactions.

Final Thoughts

Changing from DirectQuery to Import in Power BI is a common optimization step for improving report performance. By moving your data into Power BI's powerful in-memory engine, you free yourself from source system latency and unlock the full potential of DAX, resulting in a much faster and more satisfying experience for your end-users.

While mastering tools like Power BI is a valuable skill, we know it often comes with a steep learning curve spent navigating complex choices like storage modes, data gateways, and refresh schedules. At Graphed, we’ve re-imagined this entire process. Instead of needing to be an expert in the nuances of a BI tool, you can simply connect your data sources (like Google Analytics, Shopify, or Salesforce) and get answers by asking questions in plain English. No more choosing between DirectQuery and Import - our tool handles all the data connections and pipeline grunt work for you, serving you live, interactive dashboards in seconds so you can get back to analyzing, not configuring.

Related Articles