How to Delete Data Source in Power BI

Cody Schneider••9 min read

Cleaning up a Power BI report often means removing old or irrelevant information, and that starts with the data source itself. This guide will walk you through exactly how to delete a data source in both Power BI Desktop and the Power BI Service. We’ll also cover the more common scenario of simply changing or replacing a source, and troubleshoot what to do if the delete option is grayed out.

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

Good Report Hygiene: Why Delete a Data Source?

Before jumping into the "how," let’s quickly touch on the "why." Keeping your Power BI files tidy isn't just about satisfying a need for organization, it directly affects performance, maintainability, and clarity. A lean report is a fast report.

You might need to remove a data source for several common reasons:

  • The Data is Obsolete: The data comes from a marketing campaign that ended last year, a retired product line, or a one-off event. It's no longer needed for current analysis and just adds clutter to your report.
  • Data Migration: Your company migrated its sales data from a local SQL Server to a cloud-based solution like Microsoft Azure or Snowflake. You need to remove the old connection and hook up the new one.
  • Restructuring the Report: You’ve decided to combine several smaller datasets into one master source within a data warehouse to simplify your model. You can now remove the old, separate connections.
  • Incorrect Source: You simply connected to the wrong file or database by mistake. This happens to everyone, and fixing it is easy.

Whatever your reason, managing your data sources effectively is a fundamental skill for building clean, efficient, and easy-to-understand Power BI reports.

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.

Desktop vs. Service: Understanding the Difference

A frequent point of confusion is the difference between removing a source in your local Power BI Desktop file (.pbix) and deleting it from the online Power BI Service. They are two distinct actions with very different consequences.

Power BI Desktop: This is where you build your reports. When you "delete" a data source here, you are removing a query from the report file itself. This action only affects the .pbix file you are currently working on. It's like removing a single ingredient from a recipe before you've baked the cake.

Power BI Service: This is the online platform where you publish, share, and view your reports and dashboards. When you delete a "dataset" here, it’s a much more significant action. It removes the entire data model from the cloud, and as a result, all reports and dashboards connected to that dataset will break and be deleted. It's like throwing out the final cake, not just an ingredient.

With that crucial distinction in mind, let's start with the most common scenario: removing a data source from your Power BI Desktop file.

How to Delete a Data Source in Power BI Desktop

The core of your data connections lives in the Power Query Editor. This is the workshop where you add, shape, and transform all the data that feeds your visuals. It’s also where you go to remove it.

Step-by-Step Instructions

  1. Open the Power Query Editor: In Power BI Desktop, navigate to the Home tab on the ribbon. Click the Transform data button. This will launch the Power Query Editor in a new window.
  2. Locate Your Query: On the left side of the Power Query Editor, you'll see a pane labeled Queries. This list contains all of the data sources connected to your report. Each table of data from a source will appear as an item in this list. Find the specific query (data table) you want to remove.
  3. Delete the Query: Right-click on the query from the list and select Delete from the context menu. Power BI will ask for confirmation because this action cannot be undone. Click Delete to confirm.
  4. Apply the Changes: After deleting the query, you need to save and apply the changes. In the top-left corner of the Power Query Editor, click Close & Apply. Your report will refresh, and any visuals that depended on that deleted data will now show an error.

That's it! The data source has been removed from your .pbix file. You’ll now need to go through your report pages and either delete the broken visuals or update them to use a different data source.

Pro Tip: Check Dependencies First

Before you hit delete, it’s wise to see what you're about to break. Power Query has a handy feature that shows you how your queries are related to each other.

In the Power Query Editor, go to the View tab and click on Query Dependencies. A diagram will appear, showing which of your queries depend on others. This can help you understand the full impact of removing a particular data source, especially in more complex reports where queries are merged or appended together.

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

A More Common Task: How to Instead Change a Data Source

More often than not, you don't really want to delete a source entirely - you just want to point it somewhere else. Perhaps you were building your report using a test version of an Excel file, and now you need to point it to the final, live version. Or maybe your database server has been updated with a new name.

Instead of deleting the connection and rebuilding your visuals, you can simply change the source path.

Step-by-Step Instructions

  1. Open Data Source Settings: In the main Power BI Desktop window (not Power Query), click the small arrow on the Transform data button and select Data source settings.
  2. Select the Source to Change: A dialog box will appear listing every data source connection in your current file. Select the source you want to update from the list and click the Change Source... button.
  3. Provide the New Path: Another dialog box will pop up, asking for the new location.
  4. Apply Changes: Click OK once you've defined the new source path. Close the Data source settings window, and click Apply changes when the yellow bar prompts you at the top of the screen. Power BI will then refresh all the data, pulling it from the new location.

This method saves a tremendous amount of time, as it keeps all of your data transformations and visual configurations intact. All that changes is the underlying source of the data.

How to Delete a Dataset in the Power BI Service

As we discussed, this action is far more destructive than removing a source in Desktop. Only do this if you are absolutely certain you want to remove the dataset and all associated reports from your workspace permanently.

Let’s say you’ve published a report that’s now obsolete and you want to remove it entirely from the Power BI Service to reduce clutter.

Step-by-Step Instructions

  1. Login and Navigate to Your Workspace: Sign in to app.powerbi.com and navigate to the workspace containing the dataset you want to delete.
  2. Find the Dataset: In the main view of your workspace, you will see tabs for All, Content, and Data. Click the Data tab to see all the datasets and dataflows. Find the name of the dataset you wish to remove.
  3. Initiate the Deletion: Hover over the dataset to reveal more options, or click the three vertical dots (...) next to its name. Select Delete from the menu.
  4. Confirm the Deletion: Power BI will display a stark warning, listing all the reports and dashboards that will be permanently deleted along with this dataset. You must read this carefully to ensure you aren't deleting something important. If you are certain, check the box and click Delete.

Once confirmed, the action is immediate and cannot be undone. Any bookmarks or direct links to the associated reports will now be broken.

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.

Troubleshooting: "I Can't Delete a Data Source!" (It’s Grayed Out)

Sometimes you’ll right-click a query in the Power Query Editor and find that the "Delete" option is grayed out and unavailable. This is not a bug, it's a feature.

This typically happens when another query in your report references the query you are trying to delete. For example, you might have one query that connects to your sales data (let's call it "SalesRaw"), and a second query that starts by referencing "SalesRaw" to then filter it down for a specific region (we'll call it "uk-sales").

In this scenario, you cannot delete "SalesRaw" because "uk-sales" depends on it. Power BI prevents you from doing this to avoid breaking the query chain.

The Solution:

  1. Use the Query Dependencies view (under the View tab in Power Query) to see what other queries are referencing the one you can't delete.
  2. You must first delete the dependent queries (in our example, "uk-sales"). Once those are gone, you will be able to right-click on the base query ("SalesRaw") and delete it.

Think of it as working backward from the end results. You have to remove the final pieces before you can remove the foundational one.

Final Thoughts

Managing data sources is a critical but straightforward part of the reporting workflow in Power BI. Whether you’re tidying up a report file in Desktop, pointing a connection to a new server, or removing a published dataset completely from the Service, following these clear steps ensures you can do so cleanly and confidently.

We know that managing and connecting data sources like this - dealing with gateways, query dependencies, and broken reports - is often the most frustrating part of the whole process. That's why we built Graphed to be different. You connect your platforms like Google Analytics, Shopify, or Salesforce once with a few clicks, and we handle the data pipeline and warehousing for you, keeping everything in sync automatically. This lets you skip the technical hurdles and focus on getting answers from your data in plain English.

Related Articles