How to Refresh Direct Query in Power BI

Cody Schneider8 min read

Thinking about how to "refresh" data in Power BI’s DirectQuery mode can feel a bit like a trick question. Unlike its counterpart, Import mode, a DirectQuery dataset doesn’t live inside a static file that you need to manually update. This article will cut through the confusion, explaining exactly what a 'refresh' means in the context of DirectQuery and how you can manage it to keep your reports perfectly up-to-date.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

What Exactly is the Difference Between DirectQuery and Import?

Before jumping into refresh settings, it’s essential to understand the fundamental difference between Power BI's two main data connection modes: Import and DirectQuery. This choice impacts everything from performance to data freshness.

Import Mode: A Static Snapshot of Your Data

When you use Import mode, Power BI takes a complete copy of your data from the source and loads it into its high-performance in-memory engine. This is like taking a snapshot in time. Your report is built on top of this cached data.

  • Pros: Report interactions like filtering and slicing are incredibly fast because all the data is already inside Power BI. You can also perform complex data transformations and use the full range of DAX functions without worrying about the source database.
  • Cons: The data is only as fresh as your last refresh. If your source database updates, you won't see those changes until you run a scheduled or manual refresh, which can take time and consume service resources. There are also limits on dataset size (typically 1 GB for Pro users).

DirectQuery Mode: A Live Connection to Your Data Source

With DirectQuery, Power BI does not store a copy of the data. Instead, it acts as a visualization layer that sits on top of your live data source. Every time you interact with a report - slicing a chart, applying a filter, opening a page - Power BI sends a query directly to the underlying database to fetch the necessary data.

  • Pros: Your reports always show near real-time data. This is perfect for volatile, fast-moving datasets like those found in sales, operational, or IoT dashboards. You can also work with massive datasets that are too large to fit in memory.
  • Cons: Performance depends heavily on the speed of your underlying data source. A slow database will result in a slow report. There are also some limitations on the types of transformations you can do in Power Query Editor and the DAX functions you can use.

Think of it this way: Import Mode is like a printed annual report - a complete, detailed snapshot from a specific point in time. DirectQuery is like a live security feed - you're always watching what's happening right now.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Dispelling the Myth: Do You Even Need to "Refresh" a DirectQuery Report?

This is the core of the issue. The word "refresh" means something very different for a DirectQuery dataset compared to an Import dataset. Since there's no data stored in Power BI to begin with, you aren't "refreshing" a dataset in the traditional sense.

So, what happens when you hit the “Refresh” button on a DirectQuery report in the Power BI Service?

It primarily does two things:

  1. It clears the server-side cache. To optimize performance, the Power BI service occasionally caches visualization data. A manual refresh forces this cache to be cleared, ensuring that the next visual you load queries the source directly for the absolute latest data.
  2. It checks for schema changes. It queries the source database to see if any tables have been renamed, columns added or removed, or data types changed. This keeps your data model in sync with the source.

Essentially, a 'refresh' on a DirectQuery report isn’t about updating the data values (that happens automatically with every click), it’s about clearing caches and syncing the report's structure with the source database.

Managing Live Updates with DirectQuery in Power BI

Instead of thinking about "scheduled refreshes" to update your numbers, DirectQuery focuses on "live updates" to keep visuals fresh based on user interaction or time. Here’s how you control this behavior.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Automatic Page Refresh Method

The best way to get a true real-time dashboard feel with DirectQuery is to use the Automatic Page Refresh feature. This allows you to set a specific interval for all visuals on a report page to automatically query the data source and update themselves, without anyone having to click a thing.

It's an amazing feature for command center displays, monitoring screens, and second-to-the-second operational dashboards. Here’s how to set it up:

  1. Open your report in Power BI Desktop.
  2. Select the page you want to have auto-update by clicking on its blank canvas (don't select any specific visual).
  3. Go to the Visualizations pane on the right.
  4. Click the Format page icon (it looks like a paint roller).
  5. Look for the Page refresh section at the bottom of the list and toggle it On.
  6. You can set the refresh type to Auto refresh and define the interval (e.g., every 30 minutes, 5 minutes, or down to every 1 second, depending on your capacity).

Important Note: The minimum refresh interval you can set depends on your Power BI capacity type. Pro users are generally limited to 30-minute intervals. To get down to one-second updates, you'll need a Premium or Embedded capacity. Setting a very short interval can put a lot of strain on your data source, so use this feature wisely.

Managing the "Scheduled Cache Refresh" Setting

If you head into the dataset settings in the Power BI Service, you might notice an option for "Scheduled cache refresh." This can be confusing. Does this refresh my data?

No, not directly. For a DirectQuery model, this setting controls how often Power BI's reporting cache for dashboard tiles is refreshed. Dashboard tiles don't send live queries when a user views them, they rely on this cache to display their data.

By default, this is set to one hour. This means if your DirectQuery source updates, a dashboard tile pinned from your report might show data that's up to an hour old, even though the report itself would be live. You can change this schedule (e.g., to every 15 minutes) in your dataset settings to make your dashboard tiles update more frequently, but once again, this is not the mechanism that keeps your main report visuals fresh.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Best Practices for Working with DirectQuery Refresh

To successfully deliver fast, reliable, and up-to-date reports using DirectQuery, keep these tips in mind.

  • Optimize Your Data Source: This is the single most important factor. Since Power BI is constantly querying the source, the database must be optimized for performance. Invest in proper indexing, have enough compute power, and make sure network latency is low.
  • Push Transformations to the Source: With DirectQuery, you should do as much data cleaning, shaping, and modeling in the source system itself as possible. Write SQL views that pre-aggregate data or define business logic. This drastically reduces the query complexity and improves report load times.
  • Simplify Your Data Model: Avoid overly complex relationships and try not to add calculated columns that can't be easily translated back to your source query language. Simpler models result in simpler, faster queries.
  • Limit the Number of Visuals: Every visual on a report page sends at least one query to the source database when the page loads. Be deliberate with your design - ten visuals mean ten (or more) queries firing at once. Focus on what's most important to avoid slow load times.
  • Use Automatic Page Refresh Thoughtfully: Just because you can refresh every second doesn't mean you should. A one-minute interval is often more than enough for many "real-time" scenarios and puts far less load on your infrastructure. Match the refresh rate to your business need.

Final Thoughts

Mastering DirectQuery is about shifting your mindset from a push-style "scheduled refresh" to a pull-style "live query" model. Instead of importing large datasets, you're building a sleek visualization layer that queries your live data just in time. The key to keeping your report fresh is leveraging Automatic Page Refresh for truly real-time updates and understanding that the manual 'refresh' buttons are mainly for clearing caches and syncing structural changes.

Managing live connections and making data immediately accessible can sometimes feel overly complicated, especially when you're connecting to multiple platforms. At Graphed, we've automated this entire process. We connect directly to your marketing, sales, and advertising sources and use natural language AI, so you can build real-time dashboards just by describing what you want to see. Your reports always pull live data that updates automatically, without wrestling refresh cadences, schema changes, or performance tuning. To see how quickly you can get live insights, take a look at Graphed and start asking questions of your data in seconds.

Related Articles