How to Remove Data Source from Power BI Desktop

Cody Schneider8 min read

Trying to change or remove a data source in Power BI can feel like a hunt for a hidden menu. Whether your file has moved, you're switching from a test environment to production, or you simply connected to the wrong spreadsheet, updating your report shouldn't be a frustrating task. This guide will walk you through the correct ways to remove, replace, and manage your data sources in Power BI Desktop so you can keep your reports accurate and up-to-date.

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

Why Would You Need to Remove or Change a Data Source?

Working with data is rarely a static process. Your report is a living document, and its underlying data sources can change for many valid reasons. Understanding the 'why' helps you pick the right method for updating your connections.

Common scenarios include:

  • A File or Folder Moved: The most frequent reason. An Excel file or CSV in a local folder is moved to a shared drive, SharePoint, or a new server.
  • Switching Environments: You've built your report using a test or staging database and need to switch it over to the live, production database.
  • Source Consolidation: You may have started with multiple files but have since combined them into a single, more reliable source of truth.
  • Source Decommissioning: The original data source is no longer in use and needs to be completely removed from the report.
  • Correcting a Mistake: You simply connected to the wrong dataset and need to replace it without rebuilding all your visualizations from scratch.

In all these cases, your goal is to update the connection with minimal disruption to your existing report layouts, measures, and data transformations.

The Two Main Ways to Manage Your Power BI Data Sources

Power BI gives you two primary areas for handling data connections: the Data source settings menu and the Power Query Editor. Each one serves a slightly different - but related - purpose.

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.

Method 1: Using the 'Data source settings' Menu for Quick Changes

The ‘Data source settings’ dialog is the best place to go when the type of your data source is the same, but its location or credentials have changed. Think of it as updating the address for a source that Power BI already knows how to talk to.

This is the perfect tool for when you need to switch a file path from a local drive to a shared network drive.

Here’s how to do it step-by-step:

  1. From the main Power BI Desktop window, go to the Home tab on the top ribbon.
  2. Click the Transform data button, but instead of clicking the main icon, click the small dropdown arrow below it.
  3. Select Data source settings from the menu.

A new window will pop up showing every data source connected to your current file.

To Change a Source Path:

  • Select the data source you want to update from the list.
  • Click the Change Source... button at the bottom.
  • A dialog box specific to that source type will appear. If it’s an Excel file, you’ll see a file explorer. If it’s a SQL server, you’ll be asked for the new server and database names.
  • Navigate to the new file, enter the new server details, and click OK.

To Clear Saved Permissions/Credentials:

  • Select the data source from the list.
  • Click the Clear Permissions button. Power BI will warn you that this will break the connection.
  • Click Delete to confirm.
  • The next time you refresh your data, Power BI will prompt you to enter new credentials for that source, just like it was the first time you connected.

Method 2: Using the Power Query Editor for Deleting a Source Completely

If you need to sever a connection for good - meaning you no longer need that data in your report at all - the Power Query Editor is the place to do it. Each connection in your report exists as a "query." Deleting the query removes the source and all associated data.

Follow these steps to delete a query:

  1. In the Home tab, click the main Transform data button. This will launch the Power Query Editor in a new window.
  2. On the far left, you’ll see the Queries pane, which lists all the data ingestion processes for your report.
  3. Find the name of the query connected to the data source you want to eliminate.
  4. Right-click on the query and select Delete from the context menu.
  5. Power BI will ask for confirmation. Click Delete again.

Important Warning: Deleting a query this way is a permanent action that cannot be easily undone. Once removed, any visuals, charts, or measures in your main report that relied on that specific query will break immediately. Use this method only when you are absolutely certain you no longer need that data source or any data derived from it.

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

How to Replace a Data Source Without Breaking Your Entire Report

Often, your goal isn’t to delete a source but to swap it with a new one while keeping all your existing transformation steps and visuals intact. The key is to replace the starting point - the "Source" step - without disturbing the rest of the flow.

This is best handled directly within the Power Query Editor and is incredibly useful when switching from a staging database to production, or swapping an old CSV file for an updated version with the exact same structure.

Here is the most reliable way to replace a source:

  1. Open the Power Query Editor (Home tab > Transform data).
  2. In the Queries pane on the left, select the query whose source you need to change.
  3. On the far right, look for the Query Settings pane. In it, you’ll find a list called Applied Steps. These are all the cleaning and transformation actions you’ve performed on the data.
  4. The very first step listed is usually named Source. Click the small gear icon (⚙️) to its right.

This action will reopen the initial connection window for that data source, allowing you to browse for a new file or input a new server address. Once you point it to the new source and click OK, Power Query will automatically re-run every subsequent applied step on the data from the new source. As long as the schema (column names, data types) is the same, your report should refresh seamlessly with the new data.

Common Problems and Troubleshooting Tips

Even with the right methods, you can run into a few tricky situations. Here’s how to handle them.

Problem: "The key didn't match any rows in the table"

This cryptic error often appears after you’ve changed a source using the "Applied Steps" method. It usually means a subsequent step is referencing a column name that no longer exists in the new data source. A common cause is a typo in a column header, like CustomerID being changed to Customer ID. To fix this, carefully go through your applied steps one by one until you find the one that breaks, then correct the reference in the formula bar.

Problem: The Data Source Keeps Re-Appearing!

Sometimes you’ll clear permissions or delete a file, but the source still shows up in your "Global permissions" list within 'Data source settings'. This is because Power BI keeps a memory of all sources you've ever connected to across all your project files for convenience.

To truly purge it from your system:

  1. Go to Data source settings.
  2. Click on the Global permissions tab.
  3. Find the lingering source in the list, select it, and click Clear Permissions and/or Delete.
  4. This tells Power BI to forget those credentials and that file path entirely.

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.

Best Practice: Use Parameters for File Paths

For advanced users, a powerful technique is to avoid hard-coding file paths or server names directly into the "Source" step. Instead, create a Parameter in Power Query to hold that information. You can then reference that parameter in your "Source" step. When the location changes, you only need to update the value of the parameter in one place, and any queries using it will update automatically. This saves a huge amount of time in reporting environments where server addresses change frequently.

Final Thoughts

Managing data sources in Power BI is a core skill that can feel confusing at first because the settings are tucked away. By mastering the difference between the Data source settings for simple path changes and the Power Query Editor for complete removals or source step replacements, you gain full control over your data connections and can maintain your reports with confidence.

While powerful, tools like Power BI require a significant learning curve to manage connections, troubleshoot query breaks, and manually craft reports. We built Graphed because we believe getting insights shouldn't require you to become a data engineer. We automate the entire process by letting you connect all your sales and marketing platforms in a few clicks. From there, you can build real-time, interactive dashboards just by asking questions in plain English - no wrestling with power queries or hunting for the right menu needed.

Related Articles