How to Remove a Data Source in Tableau
Removing a data source from your Tableau workbook should be simple, but doing it the wrong way can accidentally break your carefully crafted dashboards. Whether you're cleaning up a project or swapping an old Excel file for a live database, it's a task that requires a bit of care. This guide will walk you through the correct, safe way to remove and replace data sources in Tableau, so you can keep your analytics work clean and running smoothly.
Why Remove a Data Source in the First Place?
You’ll encounter plenty of scenarios where you need to detach a data source from a Tableau workbook. It’s a normal part of the data analysis lifecycle and usually happens for one of these reasons:
- Upgrading Your Data: You might have started your project with a static CSV or Excel file, but now you're ready to connect to a live database (like Google BigQuery, Snowflake, or SQL Server) that gets updated regularly.
- Cleaning Up Your Workbook: Over time, workbooks can accumulate data sources that were used for one-off tests or are now redundant. Removing these unused sources makes the file smaller, faster, and easier to manage.
- Consolidating Information: You might have been connecting to three different spreadsheets that you’ve since merged into a single, master data source. To streamline your workbook, you'll want to remove the old, separate files.
- Fixing Connection Issues: If a data source connection is buggy or has been deprecated, you’ll need to remove it and set up a new connection with the correct credentials or drivers.
- Simplifying for Performance: A workbook with too many active data sources can sometimes suffer from slow performance. Culling what isn't actively being used can provide a necessary speed boost.
A Quick Pre-Flight Check: Look Before You Leap
Before you even think about clicking that 'Close' button, take a minute to check for dependencies. A data source might look like it’s just sitting there, but it could be the foundation for dozens of worksheets, calculated fields, and dashboard filters. Removing it without care can cause a chain reaction of errors. Save yourself a major headache by checking a few things first.
1. Identify All Dependent Worksheets
Tableau provides an easy way to see exactly where a data source is being used. This is your first and most important step.
In the Data pane (the top-left panel where your dimensions and measures are listed), right-click on the data source you intend to remove and select Used in Sheets. An icon representing the data source will appear next to every worksheet that relies on it. By quickly scrolling through your worksheets at the bottom, you can see exactly how much of your workbook will be impacted.
2. Review Calculated Fields and Parameters
Calculated fields are an extension of your data source. If you remove the source, all calculated fields associated with it will vanish too. If you have complex calculations you don't want to lose:
- Click through your calculated fields in the Data pane.
- Right-click on any important ones and select Edit.
- Copy the formula and paste it into a text editor or notepad.
This way, you can easily recreate them once you've connected your new data source. The same goes for any parameters, sets, or groups built upon fields from that source.
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. Don't Forget Data Blending
If you're using data blending to combine information from multiple sources, check your worksheets carefully. The secondary data source in a blend is indicated by an orange checkmark in the Data pane. Removing either the primary or secondary data source will break any visualization that relies on that blend.
4. Make a Backup!
This might be the most important tip of all. Before you remove or replace any data sources, save a backup copy of your workbook. Go to File > Save As... and save a new version of your file, perhaps by adding " - backup" or a date to the file name. A .twbx (Tableau Packaged Workbook) is ideal as it includes all the data and custom images. If something goes wrong, you can always revert to this saved version without losing any of your work.
How to Remove a Completely Unused Data Source
Let's start with the easiest scenario: removing a data source that isn't connected to a single worksheet, calculation, or dashboard. Maybe you added it for a quick test and forgot about it. Removing it is straightforward.
- Navigate to any worksheet (it doesn't matter which one).
- In the top-left Data pane, identify the data source you wish to remove.
- Right-click on the name of the data source.
- From the context menu, select Close.
If the data source is truly not in use, it will disappear immediately. No warnings, no errors. It's that simple.
However, if it is in use, Tableau will stop you with a warning that says, "Closing the data source will close the worksheets that use it." This is your sign to stop and follow the steps in the next section instead.
How to Replace a Data Source Before Removing the Old One
This is the most common and practical situation. Your entire dashboard runs on an Excel file, and now you need it to run on a new SQL database instead. You can’t just "close" the old source without first swapping in the new one.
Fortunately, Tableau has a built-in feature for this exact purpose: Replace Data Source. This function smartly remaps your worksheets from the old source to the new one, saving you the exhausting work of rebuilding everything from scratch.
Step 1: Connect to Your New Data Source
Before you can replace anything, an alternative needs to exist. Add your new data source to the workbook.
- Go to Data > New Data Source (or click the database icon with a plus sign).
- Connect to your new file or database.
- Set up any necessary joins or relationships on the Data Source page.
- Once connected, navigate back to a worksheet. You will now see both your old and new data sources listed in the Data pane.
Step 2: Use the 'Replace Data Source' Feature
Now, it's time to perform the swap.
- From the top menu bar, go to Data.
- Hover over your old data source in the list and then select Replace Data Source… from the dropdown menu.
- A dialog box will appear. The 'Current' field will automatically be set to your old source.
- In the 'Replacement' dropdown, select your new data source.
- Click OK.
You'll see Tableau work for a moment as it attempts to redirect all the fields used in your vizzes from the old source to the corresponding fields in the new one. After the process is complete, the old data source will remain in the Data pane, but it will no longer have any dependencies tied to it.
Step 3: Fix Any Broken Fields
In a perfect world, the replacement works flawlessly. In reality, you'll often have a few fields to clean up, especially if the column names aren't an exact match between the old and new data sources.
You'll know something is wrong when you see small red exclamation points (!) next to some field names in the Data pane. This means Tableau couldn't find a direct match.
To fix this:
- Right-click on a broken field (the one with the red "!").
- Select Replace References….
- In the pop-up window, browse through the fields from your new data source and select the field that correctly corresponds to the broken one. For example, you might replace
[Order Date]with[order_datetime]. - Repeat this for all broken fields. As you do, you'll see the error icons disappear and your charts will spring back to life.
You may also have to edit any calculated fields that are showing errors. Simply open the calculation editor and manually replace the old field names with the new ones.
Step 4: Close the Old Data Source (For Real This Time)
Once you’ve used 'Replace Data Source' and fixed any broken references, your old source is finally inactive. You can now follow the simple steps from before:
- Right-click on the name of the old data source.
- Select Close.
This time, it should close without any warnings, as all its dependencies have been successfully migrated to the new source.
Troubleshooting Common Problems
Sometimes you might run into confusing situations. Here’s how to handle a couple of common stumbling blocks.
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.
What if I'm using a Published Data Source from Tableau Server/Cloud?
You cannot directly edit a published data source within a workbook that consumes it. But you can make a local copy to edit and then replace it.
Right-click the published data source in the Data pane and select Create Local Copy. This will save a .tds file to your computer. You can then add this local copy as a new data source to your current workbook, use the 'Replace Data Source' tool to point all your worksheets to the local version, and then close the connection to the initial published source. This essentially "unlocks" it for changes.
What if the 'Close' option is greyed out?
The 'Close' option will be greyed out if you only have one data source in your workbook. Tableau requires at least one active data source to function. If your goal is to replace it, you must first add the new data source (Step 1 of the replacement process). Once a second source is present in the workbook, the 'Close' option on the other will become active again.
Final Thoughts
Managing data sources is a fundamental skill for keeping your Tableau workbooks efficient and up-to-date. If a source is truly unused, a simple right-click and 'Close' will do the trick. For everything else, the two-stage process of 'Replace Data Source' followed by 'Close' is the safest workflow to update your data without breaking a single visual.
At Graphed, we know that so much time is spent just getting the right data connected, cleaned, and talking to each other. Hours of manual work can be spent pulling reports from different platforms, like Google Analytics, Salesforce, and Shopify, just to feed them into a tool like Tableau. We built Graphed to automate that entire first step. By seamlessly connecting all your marketing and sales data in one place, you can skip the manual wrangling and instantly create dashboards using simple, natural language. This way, you spend less time configuring data sources and more time acting on the insights they provide.
Related Articles
Facebook Ads For Jewelers: The Complete 2026 Strategy Guide
Learn how to run profitable Facebook ads for jewelers in 2026. Discover targeting strategies, visual best practices, and optimization tips to grow your jewelry business.
Facebook Ads for Pressure Washing: The Complete 2026 Strategy Guide
Learn the proven Facebook advertising strategies for pressure washing businesses in 2026. Generate more leads with targeted campaigns, compelling creatives, and proper follow-up systems.
Facebook Ads for Caterers: The Complete 2026 Strategy Guide
Learn how to run effective Facebook ads for caterers in 2026. This complete guide covers campaign structure, creative requirements, budget allocation, and timeline for results.