How to Undo in Power BI Query Editor

Cody Schneider9 min read

Made a mistake in the Power BI Query Editor and can't find the undo button? You're not alone. Unlike most programs, Power Query doesn't have a simple Ctrl+Z shortcut, but it has something even better for reversing your actions. This article will show you exactly how to undo any mistake without starting over, using the built-in "Applied Steps" feature.

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 "Applied Steps" Pane: Your Power BI Undo Button

The first and most important thing to understand is that the Power BI Query Editor (also known as Power Query) works differently from tools like Excel. Instead of applying changes directly to your data, it records every single transformation as a step in a list. This list is your undo history, and it lives in the "Applied Steps" pane.

Think of it like a recipe. When you cook, you follow steps in order: gather ingredients, chop vegetables, season the meat, etc. If you realize you added too much salt (a mistake), you wouldn't throw out the whole dish and start from scratch. You'd simply address that specific step.

Power Query does the same thing. Every action - from removing columns and filtering rows to splitting text and changing data types - is neatly logged in the "Applied Steps" pane, which is typically found on the right side of your screen. If you make a mistake, you don't need a magical undo button, you just need to find the incorrect step in your recipe and remove it.

How to Read and Use the Applied Steps Pane

When you first load data, you'll likely see a few steps already in the list, like "Source" and "Navigation." As you start cleaning and transforming your data, new steps will appear at the bottom of the list. Each time you click on a specific step in the pane, the data preview window shows you what your data looked like at that exact point in the process. This is incredibly useful for troubleshooting and finding where a mistake was made.

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.

How to Undo Your Last Action

Undoing the very last thing you did is the most common scenario. Maybe you removed the wrong column or applied a filter with the wrong criteria. Reversing this is simple and takes just a few seconds.

  • Step 1: Look at your "Applied Steps" pane on the right.
  • Step 2: Identify the very last step in the list. This is the action you just performed. For example, it might be named "Filtered Rows" or "Removed Columns."
  • Step 3: Hover your mouse over that last step. A small red 'X' icon will appear to its left.
  • Step 4: Click the 'X' icon.

Power BI will pop up a warning message that says, "Are you sure you want to delete this step? Deleting this step may affect subsequent steps which could cause your query to break." Since you're deleting the very last step, there are no subsequent steps to worry about. Just click "Delete."

Your last action is now undone, and your data has reverted to how it looked before that step was applied. It's that simple.

Correcting a Mistake from an Earlier Step

What if you didn't notice a mistake right away? You applied 10 more steps before realizing you split a column incorrectly back in step number three. This is where the power of the Applied Steps pane really shows, but it requires a bit more caution.

Simply deleting a step from the middle of the list can cause a chain reaction and break your query. For instance, if you renamed a column in step 3 and then built a filter using that new column name in step 8, deleting the "Renamed Columns" step will cause the "Filtered Rows" step to fail because that column no longer exists by that name.

Here's how to handle this safely:

  1. Isolate the Problem: Start clicking on your steps from the top down. As you click each one, watch the data preview. The moment you see an error or notice the data looks wrong, you've found the source of your mistake.
  2. Analyze the Impact: Look at the steps after the problematic one. Do they depend on the mistake you made? In our example, the "Filtered Rows" step depends on the column being renamed.
  3. Delete and Rebuild (The Cautious Method): The safest way to fix a mid-query issue is to delete the problematic step and all the steps that came after it. This clears the way for you to re-do your transformations correctly without worrying about breaking dependencies. While it means repeating some work, it guarantees a clean, error-free result.

A Smarter Way to Undo: Editing a Step Instead of Deleting It

Sometimes, you don't need to completely undo a step - you just need to adjust it slightly. Many steps in Power Query are editable, which is a much faster and safer option than deleting anything.

For example, imagine you filtered your data to show only sales from "California," but you meant to filter for "Texas." Instead of deleting the "Filtered Rows" step and reapplying it, you can just edit it.

  1. Locate the Step: Find the "Filtered Rows" step in your Applied Steps list.
  2. Find the Gear Icon: Look for a small gear icon (a cogwheel) to the right of the step name. Steps that have configuration options will show this icon.
  3. Edit the Step: Click the gear icon. This will reopen the original dialog box you used to create the step. In this case, the Filter Rows window will appear.
  4. Make Your Change: Simply change the value from "California" to "Texas" and click "OK."

Your filter is now corrected without impacting any subsequent steps. This method is incredibly efficient for fixing typos, adjusting numerical filters, or changing settings on actions like "Split Column" or "Change Type."

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

When to Edit the Formula Instead

For even more granular control, you can edit the M code that Power Query generates for each step. With the step selected, look at the Formula Bar (if you don't see it, go to the "View" tab and check the "Formula Bar" box). Here you can directly tweak the code. For example, if you changed a column header to "sales_Total" but wanted "Sales_Total," you could edit the new name directly in the formula rather than going through the rename dialog again.

Pro Tips: Making Fewer Mistakes in the First Place

While knowing how to undo is great, being proactive can save you a lot of time. Here are a few best practices to keep your queries clean and easy to troubleshoot.

1. Rename Your Steps

By default, Power Query gives your steps generic names like "Filtered Rows1," "Changed Type," and "Renamed Columns." After a dozen steps, your list becomes nearly impossible to read. To fix this, right-click any step and choose "Rename."

Change "Filtered Rows1" to something descriptive like "Removed incomplete orders" or "Filtered for US customers only." This small effort turns your Applied Steps pane into a clear, understandable timeline of your data cleaning process, making it much easier to find and fix errors later.

2. Work Incrementally

Avoid the temptation to perform ten different transformations in quick succession. Apply one significant change, check the result in the data preview window to make sure it did what you expected, and then move on to the next one. This practice helps you catch mistakes immediately, when they are just a single click away to undo.

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.

3. Duplicate Your Queries for Safety

If you're about to perform a complex series of merges, pivots, or transformations and aren't 100% sure it will work, create a safety net. In the Queries pane on the left, right-click the query you're working on and select "Duplicate."

Now you have an exact copy. You can experiment on the duplicate query without any fear of messing up your original, clean data. Once you've perfected your steps on the copy, you can either replicate them on a fresh version of the original or delete the original and rename the perfected copy.

What If You Already Closed the Query Editor? Is It Too Late?

It can be a sinking feeling: you click "Close & Apply," the data starts loading, and then you realize you deleted a critical column. The great news is that your work is not lost.

Clicking "Close & Apply" saves the transformation recipe (your collection of applied steps) and applies it to your Power BI data model, but it doesn't finalize the changes destructively. All you need to do is go to the "Home" tab and click "Transform Data" to reopen the Power Query Editor.

Your query will be there exactly as you left it, with the full list of Applied Steps available. You can undo, edit, or add steps just as before. Once you're done, simply click "Close & Apply" again, and Power BI will re-process your data using the newly updated set of instructions.

Final Thoughts

The absence of a Ctrl+Z function in Power BI's Query Editor is actually a feature, not a limitation. By breaking down every transformation into editable and deletable steps, it gives you fine-tuned control over your data cleaning process. Mastering the "Applied Steps" pane is a fundamental skill for becoming confident and efficient in Power BI.

Learning the nuances of tools like the Power BI editor is vital, but sometimes setting up dashboards and pulling reports can turn into a day-long process of tweaking settings and building visualizations. Here at Graphed, we've found a better way by using plain English to automate reporting. We use it to instantly build real-time dashboards by simply describing what we want to see, which turns hours of manual report building into a quick 30-second conversation.

Related Articles