How to Delete All Relationships in Power BI

Cody Schneider••7 min read

Needing a completely fresh start with your Power BI data model can happen for many reasons. Sometimes the automatic relationship detection creates a web of confusing connections, or you simply need to restructure everything from the ground up. This guide will walk you through the different ways to delete all relationships in your Power BI file, from the straightforward manual method to a powerful script that clears the slate in seconds.

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

Reasons to Wipe Your Relationships Clean

You might wonder why anyone would want to undo all the work of connecting tables. While it seems counterintuitive, deleting all model relationships is a common task for data analysts. Here are a few scenarios where it makes perfect sense:

  • The Auto-Detect Feature Got It Wrong: Power BI tries to be helpful by automatically creating relationships when you load data. It does this by looking for columns with the same name across different tables (like 'Date' or 'ID'). If your naming convention isn't perfectly unique, this can lead to dozens of incorrect or nonsensical connections that are faster to delete in bulk than to fix one-by-one.
  • Inheriting a Messy File: If you've taken over a PBIX file from someone else, you might find a data model that's disorganized or built on faulty logic. The quickest path to a clean, reliable report is often to blow away the old structure and rebuild it correctly.
  • Major Model Restructuring: When you're fundamentally changing your approach - like consolidating multiple tables, adding a proper dimension table, or creating a star schema - it's often cleaner to delete existing relationships and start fresh. Trying to edit and reroute connections can be more trouble than it's worth.
  • Learning and Experimentation: If you're new to data modeling, starting with a blank canvas is an excellent way to learn. It forces you to think critically about how your tables should connect and helps solidify your understanding of cardinalities and filter flow.

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: Deleting Relationships Manually in Model View

The most direct way to delete relationships is right in the Model view. This approach is best if you only have a handful of connections to remove, as it can become tedious in a large model.

Here’s how to do it:

  1. Open your Power BI file and navigate to the Model view. It’s the third icon down on the left-hand sidebar, the one that looks like three connected boxes.
  2. You’ll see your tables represented as boxes with lines connecting them. These lines are your relationships.
  3. Hover your mouse over the line you want to delete. It will become highlighted.
  4. Right-click on the highlighted line.
  5. Select Delete from the context menu.
  6. A confirmation pop-up will appear. Click Delete to confirm.

Repeat this process for every single relationship you want to remove. It's simple and effective for small models, but you can see how this would feel like a chore with 20 or 30 different connections.

Method 2: A Faster Manual Approach Using the 'Manage Relationships' Dialog

If you have more than a few relationships to remove but don't want to use external tools, there's a slightly faster way to delete them in batches using the Manage Relationships window.

Steps for Batch Deletion:

  1. From any view in Power BI, go to the Modeling tab in the top ribbon.
  2. Click on Manage Relationships. A new window will pop up, showing a list of every active relationship in your model.
  3. Click on the first relationship in the list to select it.
  4. Now you have two options for selecting multiple relationships:
  5. Once you have all the desired relationships selected, click the Delete button at the bottom of the window.
  6. You'll get a confirmation pop-up asking if you're sure. Click Delete.

This method significantly speeds up the process compared to deleting relationships one by one in the Model View, but it's still a manual task.

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

Method 3: Go Pro with Tabular Editor for Instant Deletion

For large, complex models, manual deletion is simply not practical. This is where a third-party tool like Tabular Editor comes in. Tabular Editor is a free, lightweight application that gives you direct access to the "guts" of your Power BI data model, allowing you to make bulk changes with simple scripts.

Heads up: Before proceeding, save a backup copy of your PBIX file. Making scripted changes with external tools is powerful, and you should always have a fallback.

Prerequisites:

  • You'll need to install Tabular Editor first. You can download the free community version, Tabular Editor 2, from its official website.
  • Once installed, you can enable it as an External Tool within Power BI. Go to the External Tools tab in the ribbon and launch it from there. If the tab doesn't appear, you might need to restart Power BI after installation.

How to Delete All Relationships with a Script:

  1. With your Power BI file open, go to the External Tools tab and click Tabular Editor to launch it.
  2. Tabular Editor will open in a new window, connected live to your open data model. You’ll see a tree view of your model on the left.
  3. In the Tabular Editor menu, find the Advanced Scripting window. If you don't see it, go to View > Advanced Scripting.
  4. In the C# script editor pane that appears, paste the following simple script:
foreach (var relationship in Model.Relationships) 
{
    relationship.Delete(),
}

Let's briefly break this down:

  • foreach (var relationship in Model.Relationships): This is a simple loop. It just says, "For every single relationship that exists in our data model..."
  • relationship.Delete(),: "...delete it."
  1. Click the "Run script" button (the green play icon) at the top of the Advanced Scripting pane. The script will execute instantly.
  2. You will see that the Relationships folder in the tree view on the left is now empty.
  3. Go to File > Save in Tabular Editor (or press Ctrl+S). This applies the changes back to your Power BI Desktop file.
  4. Go back to Power BI Desktop. You may notice an orange banner saying something has changed. Close the banner, go to the Model view, and you'll see that all your relationship lines have vanished. Your model is a clean slate.

This is by far the fastest and most efficient way to clear dozens or even hundreds of relationships and is a standard technique for seasoned Power BI developers.

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.

A Proactive Tip: Turn Off Autodetection

As you become more comfortable building data models, you may want to prevent Power BI from creating relationships for you in the first place. You can turn this "helpful" feature off to ensure you have complete control from the start.

  1. In Power BI, go to File > Options and Settings > Options.
  2. In the Options window, under the Current File section, click on Data Load.
  3. Uncheck the box that says "Autodetect new relationships after data is loaded."
  4. Click OK.

Now, whenever you add new tables to this specific file, Power BI will not attempt to guess the connections for you, leaving you in full command of your model.

Final Thoughts

Clearing relationships in Power BI is a fundamental task for managing and refining your data model. You can do it slowly by hand for small jobs, batch-select in the 'Manage Relationships' window for a quicker manual option, or use a Tabular Editor script to instantly reset complex models.

Wrestling with data models and relationships is a frequent challenge when building reports in tools like Power BI. This complexity is why we built Graphed. Our platform automates the complex setup - just connect your data sources like Google Analytics, Shopify, or Salesforce, and describe the dashboard you need in plain English. We handle the data modeling behind the scenes so you can get answers and insights in seconds, not hours.

Related Articles