How to Find Errors in Power BI Query
Nothing brings your data analysis to a halt faster than a cryptic error message in Power BI. One minute you're transforming data, and the next, a single red or yellow notification blocks your progress. We’ll show you exactly how to find and understand errors in the Power BI Query Editor so you can fix them quickly and get back to building your reports.
Understanding Where Errors Happen: A Quick Tour of the Power Query Editor
Before hunting for errors, it's important to know where they live. Nearly all data transformation errors in Power BI occur within the Power Query Editor. If you’re not familiar with it, Power Query is the engine that runs behind the scenes when you click "Transform Data." It records every cleaning, shaping, and merging step you take.
When you open the Power Query Editor, pay close attention to the Applied Steps pane on the right side of your screen. This list is a chronological record of everything you've done to your data, from connecting to the source to changing column types. It’s also your primary diagnostic tool. Each item in this list represents a potential point of failure, and it's the first place you should look when something goes wrong.
Method 1: Identify Query-Level Errors in the Applied Steps Pane
The most straightforward errors are "query-level" errors. These are problems so significant that Power Query can't process the step at all, preventing the query from loading any further. Power BI makes these fairly obvious to spot.
How to Find Them: A Step-by-Step Guide
- Open the Power Query Editor by clicking "Transform data" on the Home ribbon in Power BI Desktop.
- In the Queries pane on the left, look for any query with a yellow warning triangle next to its name. This is your first clue.
- Select the query that has an error. The error message will often appear in the main data preview window.
- Now, look at the Applied Steps pane on the right. You should see one of the steps highlighted with a red outline and a similar yellow triangle. This is the exact step where the error occurred.
- Click directly on the step with the error.
- At the bottom of the data preview screen, a yellow box will appear containing the specific error message, like "DataSource.Error: Could not find the file..." or "Expression.Error: The column 'Region' of the table wasn't found."
This method works perfectly for problems that break the entire query. For example, if you moved or renamed an Excel file that your report connects to, a DataSource.Error will appear at the "Source" step. By clicking on that step, Power BI tells you exactly what it can't find, allowing you to quickly update the file path and resolve the issue.
Method 2: Hunt Down Cell-Level Errors in Your Data
Sometimes, a query loads successfully, but individual cells or rows contain errors. These "cell-level" or "in-line" errors won't prevent your query from running, but they can cause major headaches in your final report, leading to broken visuals and incorrect calculations. They often appear as [Error] in a cell instead of a proper value.
These errors commonly happen during data type conversions. Imagine a column of "Units Sold" that contains mostly numbers, but one cell has the text "N/A" written in it. When Power Query tries to convert that column into a Whole Number, it can’t process "N/A," so it flags that specific cell with an error.
How to Isolate Rows with Errors
- With your query selected in the Power Query Editor, go to the Home tab on the ribbon.
- Find the "Remove Rows" button. Click the dropdown arrow next to it, and then select "Remove Errors." This action creates a new step that temporarily hides all error rows. But we want to find them, not remove them just yet.
- After using "Remove Errors" for a quick look, the best approach is to identify them. Instead of "Remove Errors," stay on the Home tab and click the "Keep Rows" dropdown. Select "Keep Errors."
- Power Query will immediately filter the table to show you only the rows that contain an error in at least one of their columns.
Using "Keep Errors" is a fantastic troubleshooting technique. It isolates the few bad rows from the thousands of good ones. Once you see the problematic data firsthand, you can click on the cell containing [Error] to see the reason for the error at the bottom of the screen. Typical reasons include:
- DataFormat.Error: "We couldn't convert to Number."
- Formula.Error: Often seen in custom columns where the logic fails for a specific row.
Once you understand the problem, you can remove the "Kept Errors" step from the Applied Steps pane (by clicking the "X" next to it) and go back to address the root cause, such as replacing the bad data at the source or using "Replace Values" to fix it within Power Query.
Method 3: Deconstruct Complex Queries to Pinpoint the Problem
For long, complex queries with dozens of applied steps, simply looking for a red icon can be overwhelming. The true source of an error might be hidden in a subtle change made ten steps earlier. In these cases, it's helpful to deconstruct the query to find the exact point of breakage.
Using "Reference" as a Safe Sandbox
Power Query lets you create a linked copy of a query called a "Reference." This is perfect for debugging because it allows you to break things without affecting your original query.
- In the Queries pane on the left, right-click on the query that has the error and select "Reference."
- A new query will be created. It's essentially a pointer to the final result of your original query. Let’s name it something like "MyQuery - Debug."
- Unfortunately, you cannot see the steps from the original query here. So, for debugging individual steps, a better way to do this is to go to the queries pane and right-click and pick "Duplicate" instead of "Reference."
- Let’s label this duplicated query as "MyQuery - Debug."
- Now, in your "MyQuery - Debug" query, start deleting steps from the bottom up. Click the big red "X" next to the last step in the Applied Steps panel.
- Did the error disappear from the data preview? If not, delete the next step up.
- Continue this process until the error vanishes. The last step you deleted is the one that caused the error. Now you know where to focus your attention in the original, non-debug query.
This technique prevents you from undoing and redoing work in your main query and provides a clear, systematic way to zero in on the single action that is causing the problem.
Common Power BI Query Errors and What They Mean
Understanding what an error is telling you is half the battle. While the messages can be technical, most boil down to a few common issues.
1. DataSource.Error
What it means: Power BI cannot connect to your data source. Common Causes:
- The file path has changed (e.g., an Excel file was moved to a different folder).
- A server is down, or you no longer have access permissions.
- A SharePoint file was updated, or a web API is unavailable.
- The name of an Excel worksheet or a database table has been changed.
2. DataFormat.Error
What it means: The data in a cell doesn't match the format for that column. Common Causes:
- Trying to convert a text value (like "None") into a number.
- Attempting to turn a value like "December 25, 2023" into a date when Power BI is expecting a different format (e.g., MM/DD/YYYY).
3. Expression.Error
What it means: There's a problem with a formula, usually in your M code. Common Causes:
- A custom column formula refers to a previously-existing column that you have since renamed or deleted.
- A typo in a column name within a formula. Remember M code is case sensitive.
[Sales]is not the same as[sales].
4. Formula.Firewall
What it means: This is a complex error related to data privacy. Power BI separates data sources to prevent sensitive information from one source leaking to another. The firewall error appears when a query tries to combine data from sources with different privacy levels (e.g., merging a public web source with a private organizational file) in a way that Power Query flags as insecure. Simple Fixes:
- Go to File → Options and settings → Options. Under "Global - Privacy," try setting the privacy level for all sources to Organizational or Public (use with caution!).
- Sometimes, redesigning your query to avoid blending data until the very end can solve the issue.
Final Thoughts
Troubleshooting in Power BI becomes much easier once you know how to read the signs. By methodically checking the Applied Steps pane, filtering to isolate bad data rows, and safely deconstructing complex queries, you can diagnose and fix almost any problem the Power Query Editor throws at you.
While mastering Power BI's error handling gives you a powerful skillset, we know that spending hours cleaning data and untangling formulas isn't anyone's favorite task. At Graphed, we aim to eliminate this friction entirely. We connect directly to your marketing and sales data sources - like Google Analytics, HubSpot, and Shopify - so you bypass much of the complex data cleaning. Instead of wrestling with Applied Steps, you interact with your data in plain English, building live dashboards just by describing what you want to see.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.