How to Improve the Query Performance in Power BI

Cody Schneider••9 min read

There's nothing more frustrating than building a fantastic Power BI report only to have it load at a snail's pace. A slow report not only irritates stakeholders but also undermines their trust in your data, because if it's slow, users wonder what else might be wrong. The good news is that you can fix it. This guide breaks down several practical, high-impact strategies to improve your query performance and make your Power BI reports fast and responsive.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

The Golden Rule: Shape Data Before It Loads

The single most effective way to improve Power BI performance happens before you even build a single visual. It happens in the Power Query Editor. The goal is simple: only load the data you absolutely need for your report. Every extra column and row you import consumes memory and slows down calculations, whether you use them in a chart or not.

Remove Unnecessary Columns

Databases often contain dozens of columns that are irrelevant to your analysis. Think about administrative IDs, system notes, or metadata fields. Each one adds weight to your data model.

  • Be Ruthless: As you connect to a data source, immediately go through the column list in the Power Query Editor. If you don't have a clear, immediate purpose for a column in your report, remove it.
  • How to Do It: In the Power Query Editor, select the column(s) you don't need (hold Ctrl to select multiple), right-click, and choose "Remove Columns." This step is tracked in the "Applied Steps" pane, so you can always bring a column back if you make a mistake.

A good rule of thumb: If you're importing a table with 50 columns but only plan to use 10, remove the other 40. This can dramatically decrease the model's size and speed up refresh times.

Filter Rows as Early as Possible

Just as you should trim columns, you should also trim rows. Do you really need ten years of sales data if your report only focuses on the last two? Limiting the number of rows is a massive performance win.

  • Filter at the Source: The best place to filter is in the source itself if you have that option (e.g., using a SQL query or a database view). This prevents the data from ever being sent over the network to Power BI.
  • Filter in Power Query: If you can't filter at the source, your next best option is filtering within the Power Query Editor. Use the filter dropdowns on any column to remove unwanted data, like filtering a date column to only include data "in the last 2 years."

This early filtering is crucial for a concept called Query Folding, which we'll cover next.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Understanding and Leveraging Query Folding

Query Folding is one of Power BI's most powerful, yet often overlooked, performance features. In simple terms, it's the process where Power BI translates the transformations you make in the Power Query Editor (like filtering, removing columns, grouping, etc.) into a single, efficient query written in the native language of the source system (like SQL).

Think of it like this: Instead of asking your database for an entire 10-million-row table and then filtering it down within Power BI, Query Folding asks the database, "Please give me only the 1,000 rows I need from these 5 specific columns." The work happens on the powerful server, not on your local machine.

How to Check if Query Folding is Working

Power BI makes it easy to see if your steps are being "folded."

  1. In the Power Query Editor, apply a few simple transformations like filtering a column or removing a few others.
  2. Look at your "Applied Steps" on the right.
  3. Right-click on the last applied step you believe should be folded.
  4. If the option "View Native Query" is clickable, Query Folding is working! If it's grayed out, the transformations after the last foldable step are being processed by the Power BI engine, which is much slower.

Your goal is to keep Query Folding active for as many steps as possible.

Common Actions That Break Query Folding

Not all transformations can be translated into the source system's language. Be mindful of these common Query Folding breakers:

  • Applying steps that involve data from two different sources.
  • Adding an index column.
  • Using certain complex M functions in a Custom Column that don't have a direct SQL equivalent. Simple math operations (+, -, *, /) usually fold fine, but complex text manipulation might not.
  • Certain data type changes.

If you see that Query Folding has stopped, examine the step that broke it. Sometimes, reordering your steps can help. For example, do all your filtering and column removals first before adding a custom column or index.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Build a Lean and Efficient Data Model

Once your data is shaped and cleaned in Power Query, the next performance checkpoint is your data model. How you structure and relate your tables can have a huge impact on your visuals' load times.

Embrace the Star Schema

It's tempting to merge everything into one massive, wide table. This is often a mistake. The optimal data model structure for Power BI is a star schema.

  • Fact Tables: These tables contain the numeric, transactional data you want to measure. For example, a Sales table with columns like OrderDate, ProductID, CustomerID, Quantity, and SaleAmount.
  • Dimension Tables: These tables describe the business entities. They are connected to your fact table and used for filtering and slicing. Examples include a Products table (with ProductID, ProductName, Category) and a Customers table (with CustomerID, CustomerName, Region).

This structure is highly efficient because it avoids storing redundant descriptive text (like 'Product Name') over and over again in the fact table. The relationships are cleaner, the model is smaller, and DAX calculations run much faster.

Use the Right Data Types

Ensure every column in your model is set to the most appropriate data type. Doing this in Power Query is best, but you can also adjust it in the Data view.

  • Numbers over Text: If a column contains only whole numbers (like an ID), set its type to Whole Number instead of Text. The Power BI engine is dramatically more efficient at processing numbers.
  • Dates: Use the Date or Date/Time type instead of text for date fields to enable proper time intelligence functions.
  • Trim The Fat: If you only need the date and not the time, use the Date type. Don't use Decimal Number if Whole Number will suffice. These small savings add up across millions of rows.

Calculated Columns vs. Measures: A Critical Choice

When you need to create a new calculation in Power BI, you have two options: a calculated column or a DAX measure. Understanding the difference is vital for performance.

  • Calculated Columns: These are computed during data refresh and are physically stored in your data model. They consume RAM and disk space, just like any other column. The value is calculated for each row and doesn't change based on user interaction.
  • Measures: These are calculated on-the-fly when a user interacts with a report (e.g., adds it to a visual or changes a slicer). They are not stored in the model and consume CPU at query time.

Rule of thumb: use measures whenever possible.

When to Use Each

Use a Calculated Column When:

  • You need to use the value in a slicer, filter, or on a chart axis.
  • The calculation is based on the values in a single row (e.g., Price * Quantity to get a LineTotal).
  • You are creating a static category to group data (e.g., a "Price Tier" column based on product price).

Use a Measure When:

  • You are performing an aggregation over many rows (e.g., SUM(Sales[SaleAmount])).
  • The value needs to be dynamic based on user selections in the report.
  • You want to calculate ratios, percentages, or complex business logic.

Creating complex calculated columns, especially on very large tables, can seriously inflate your model size and slow down refresh times. Shift that logic to a measure whenever you can.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Diagnose Slow Visuals with the Performance Analyzer

If your report is still sluggish after following the above steps, it's time to become a detective. Power BI has a fantastic built-in tool called the Performance Analyzer to help you identify exactly which visuals are causing the bottleneck.

Here's how to use it:

  1. Go to the View tab in Power BI Desktop.
  2. Click on the Performance Analyzer button. A new pane will open.
  3. Click Start recording.
  4. Now, interact with your report page as a user would. Click slicers, cross-filter charts, or just let the page load. Actions and their durations will appear in the pane. You can also click "Refresh visuals" to see the load time for every element on the page.

The analyzer breaks down the load time for each visual into three categories:

  • DAX query: The time it takes for Power BI to send the query for the visual and for the data source to return the results. A long duration here points to an inefficient DAX measure or a complex data model.
  • Visual display: The time it takes for the visual to render on screen. High duration here could mean you're using a complex custom visual or trying to display too many data points (e.g., a scatter plot with 50,000 dots).
  • Other: The time visuals spend waiting for other operations to complete.

Focus on the visuals with the longest durations. Copy their DAX queries into a tool like DAX Studio to analyze them, or look for ways to simplify the visual itself.

Final Thoughts

Improving Power BI performance involves a "peeling the onion" approach. Start with the broadest changes in Power Query, then refine your data model and DAX, and finally use tools like the Performance Analyzer to pinpoint any remaining slow spots. By proactively shaping your data and building an efficient model from the start, you create a foundation for a fast, usable report that your stakeholders will love.

We've spent countless hours tuning queries and wrestling with data models in powerful tools like Power BI. While incredibly capable, it often involves a significant investment in time and technical learning. This is a core reason we built a different kind of analytics tool. With Graphed, we use AI to handle all the complexity, connecting directly to your sources like Google Analytics, Shopify, and Salesforce and letting you build real-time dashboards just by describing what you want to see. We believe getting crucial business insights shouldn't require you to become a query tuning expert.

Related Articles