How to Delete Pending Queries in Power BI
Ever hit the refresh button in Power BI and watched in frustration as a loading bar gets stuck on "Waiting for other queries..."? It's a common bottleneck that can turn a quick data update into a long coffee break. Understanding what causes this and how to fix it is key to building efficient, fast-loading reports. This guide will walk you through how to identify, manage, and safely delete the pending queries that are holding up your data refresh.
Why Are My Power BI Queries Pending?
In Power BI, queries rarely run in total isolation. Most of the time, they operate like a well-coordinated relay team. A query that connects to your sales database might finish its job and "pass the baton" to another query that uses that sales data to calculate regional performance. If that first query is slow or gets stuck, every other query waiting for its data is forced to wait, too.
This is called a query dependency, and it's the number one cause of the "pending query" backlog. Think of it as a production line in a factory. If the first station that gathers the raw materials shuts down, the entire line comes to a halt.
Here are the most common culprits behind pending and slow queries:
- Complex Dependency Chains: You might have one main query that sources data, which then feeds into five other queries for transformations, and those then feed into several more for merging. A delay in the initial query creates a domino effect.
- Slow Data Sources: The issue might not be Power BI itself. Your query could be trying to pull data from a slow-running SQL server, a rate-limited API, or a massive Excel file on a sluggish network drive. Power BI is just waiting for the source to send the data.
- Heavy Transformations: If a query performs complex transformations using lots of M code, such as unpivoting large tables, running custom functions over many rows, or merging massive datasets, it will naturally take longer to execute.
- Data Privacy Settings: Power BI's data privacy settings (e.g., Organizational, Private, Public) determine if data sources can share information. If they are not configured correctly, Power BI has to analyze each source independently, which can prevent queries from running in parallel and cause slowdowns.
- Disabled Parallel Loading: By default, Power BI tries to run multiple independent queries at the same time to speed things up. If this setting (called "parallel loading" or "Enable parallel loading of tables") has been turned off, queries are forced to run one after another, creating an artificial backlog.
How to Find the Bottleneck with Query Dependencies
Before you start deleting anything, you need to pinpoint exactly which query is the source of the jam. Blindly deleting queries is a recipe for broken reports. Luckily, the Power Query Editor has a built-in visual tool for this.
Follow these steps to diagnose the problem:
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.
Step 1: Open the Power Query Editor
From your Power BI Desktop report view, go to the Home tab and click on Transform data. This will open the Power Query Editor, a separate window where all your data ingestion and transformation magic happens.
Step 2: Access the Query Dependencies View
Once you're in the Power Query Editor, navigate to the View tab in the ribbon. Look for the Query Dependencies button and click it.
Step 3: Analyze the Dependency Diagram
Power BI will now show you a flowchart of your queries. This is your map to finding the bottleneck.
- Each box represents a query.
- Arrows indicate the direction of data flow. If Query A has an arrow pointing to Query B, it means Query B depends on Query A.
- Queries with no incoming arrows are your original data sources (e.g., a SQL database, a CSV file).
Look for the query that many other queries are pointing away from. These are your "base" or "staging" queries. A slowdown in one of these upstream queries will impact everything downstream. Trace the longest chains to see where the hold-up might be originating.
How to Safely Delete a Pending Query
Once you have identified the troublesome query, you can decide how to handle it. You might need to delete it, or you might just need to optimize it. Let's cover both scenarios.
Scenario 1: You Need to Delete an Unnecessary Query
Sometimes you'll find a query that was part of an early exploration or has since been made redundant. If you are certain it's no longer needed, deleting it is simple.
Warning: Before you delete, use the Query Dependencies view one last time to confirm that nothing depends on this query. If you delete a query that other queries are referencing as a source, you will break them. Power BI will warn you, but it's good practice to check first.
- In the Power Query Editor, find the query you want to remove in the Queries pane on the left.
- Right-click the query name.
- Select Delete from the context menu.
- A confirmation pop-up will appear. Click Delete again.
If you made a mistake, you can simply click "Undo," or you can close the Power Query Editor without applying the changes by clicking "Discard Changes."
Scenario 2: You Need a Query, but It's Creating a Bottleneck
More often, the problematic query is essential. You can't just delete it. In this case, your goal is to break its bottleneck effect temporarily so you can work on optimizing it without holding up everything else.
1. Disable the Refresh
The easiest way to stop a slow but necessary query from blocking your whole refresh is to exclude it from the refresh process. This allows you to work with your other queries and then come back to fix the slow one.
- In the Power Query Editor, find the query in the Queries pane.
- Right-click the query name.
- A context menu will appear. Make sure the option for Include in report refresh is unchecked. By default, it's checked. Unchecking it tells Power BI to skip this query during a data refresh.
Now, when you hit "Refresh Preview" or "Close & Apply," Power BI will ignore this query entirely, freeing up all the dependent queries. The data will be stale, but at least your development workflow is unblocked. You can revisit this query later to optimize it.
2. Optimize the Query Itself
After you've disabled the refresh to unblock yourself, it's time to fix the underlying performance problem. Here are a few high-impact optimization techniques:
- Filter Early, Filter Often: Don't pull in 10 years of sales data if you only need the last 12 months. Add filter steps as early as possible in your transformation process, preferably right after the
Sourcestep. This reduces the amount of data Power BI has to process in all subsequent steps. - Remove Unnecessary Columns: Just like filtering rows, you should remove any columns you don't need for your report. Each extra column burns memory and processing power. Use the "Choose Columns" feature to select only what's necessary.
- Leverage Query Folding: This is a powerful feature where Power BI translates your transformation steps (like filtering and removing columns) into the native language of the source system (like SQL). Instead of Power BI downloading a giant table and filtering it, the server filters it first and sends only the small, relevant dataset. You can check if folding is active by right-clicking a step and seeing if "View Native Query" is clickable.
Best Practices to Avoid Pending Queries in the Future
Fixing pending queries is good, but preventing them is even better. Here are a few tips to build fast and efficient Power BI reports from the start.
Keep Your Data Model Lean
The more data and the more complex transformations you have, the higher the chance of slowdowns. Don't use Power Query as a substitute for a proper database. Perform heavy transformations upstream at the data source if possible, and only import the tables and columns that are strictly necessary for your visuals.
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.
Be Mindful of Your Data Privacy Settings
In File > Options and settings > Options, go to the Privacy section. If all your sources are within your company, setting them to "Organizational" can improve performance. Setting everything to "Private" can create performance roadblocks as Power BI isolates each data buffer.
Enable Parallel Loading
Also under Options and settings > Options, find the Data Load section. Ensure that "Enable parallel loading of tables" under Parallel loading is checked. This allows Power BI to execute multiple independent query trees at the same time, significantly cutting down on refresh times.
Final Thoughts
Tackling pending queries in Power BI comes down to understanding dependencies, not guessing. By using the Query Dependencies view to diagnose the bottleneck, you can safely delete unneeded queries or optimize the slow ones without breaking your entire report. Adopting proactive habits like filtering early and enabling parallel loading will keep your reports running smoothly from the start.
This process of debugging dependencies, optimizing M code, and waiting for refreshes is a common hurdle with traditional BI tools. We built Graphed to remove this friction entirely. Instead of you having to stitch together data sources and manually optimize query chains, we allow you to connect all your data sources with a single click and simply ask for what you want in plain English. Graphed automatically handles the connections and data fetching in the background to build real-time, interactive dashboards in a matter of seconds, giving you back the time you'd otherwise spend stuck on a loading screen.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.