How to Delete Rows in Tableau Data Source

Cody Schneider••7 min read

Stuck with outlier data, test entries, or irrelevant information cluttering your Tableau workbook? You're not alone. The need to remove specific rows is a common step in data cleanup, and thankfully, Tableau provides a few straightforward ways to do it without ever altering your original source file. This article will walk you through the most effective methods to delete — or more accurately, exclude — rows from your data source in Tableau.

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 Bother Removing Rows from Your Data?

Before jumping into the "how," let's quickly cover the "why." Cleaning your data source by removing unnecessary rows is a foundational step in building meaningful dashboards. It directly impacts three key areas:

  • Accuracy: If your data includes test transactions, internal user activity, or system-generated empty rows, your calculations for things like average order value, total revenue, or conversion rates will be wrong. Removing this data ensures your analysis reflects genuine activity.
  • Performance: The more data Tableau has to process, the slower your dashboards will run. By filtering out millions of irrelevant historical records or noisy data points at the source, you dramatically reduce the workload, leading to faster load times and a better user experience.
  • Clarity: A cluttered visualization is an ineffective one. Removing outliers or irrelevant categories helps you focus your analysis on the information that actually matters, making trends and insights easier to spot. Blank or "null" rows, for example, can create ugly gaps in charts and confuse your stakeholders.

Method 1: The Go-To Approach with Data Source Filters

The simplest and most direct way to remove rows from your entire workbook is by applying a filter directly on the Data Source tab. This method excludes the data before it even enters your worksheets, ensuring clean and consistent analysis across every visualization you build.

Here’s how to set it up step-by-step:

Step 1: Navigate to the Data Source Tab

Open your Tableau workbook and look at the bottom-left corner of the screen. Click on the Data Source tab to view the data you're connected to. This is where you can see your tables, joins, and a preview of the columns and rows.

Step 2: Add a Filter

In the top-right corner of the Data Source screen, you’ll see a section labeled Filters. Click the "Add" button to open the Edit Data Source Filters dialog box.

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.

Step 3: Choose Which Field to Filter On

Another small dialog box will pop up. Click the "Add..." button inside it. This will present you with a list of all the fields (columns) in your data source. Select the field that contains the criteria for the rows you want to delete. For example:

  • To remove test orders, you might select a field called Order Type or Customer Name if your test records are tagged consistently.
  • To remove data from a specific country, you would select the Country field.
  • To remove outdated orders, you'd choose the Order Date field.

Step 4: Configure the Filter to Exclude Values

This is where you tell Tableau exactly what to remove. After selecting a field, a new window appears where you can define the filter rule.

Example A: Excluding Specific Values (like "Test")

Imagine you have a Customer Segment field and you want to remove all rows where the segment is identified as "Internal/Test".

  1. Select the Customer Segment field in the previous step.
  2. A list of all values ("Consumer," "Corporate," "Internal/Test," etc.) will appear.
  3. Check the box next to "Internal/Test."
  4. At the bottom, select the Exclude option instead of "Include."
  5. Click OK.

Tableau will now hide every single row where the customer segment is "Internal/Test" from your entire workbook.

Example B: Using a Condition to Exclude Rows

Let's say you need to remove low-value orders that are cluttering your view. You could filter out any row where Sales are less than $10.

  1. Select the Sales field.
  2. In the filter dialog, go to the Condition tab.
  3. Choose By field.
  4. Configure the condition to read: Sum([Sales]) < 10. If you wanted to remove a product with Product ID 345, you can add [Product ID] and select "345" and pick exclude or even more simply go back one screen and uncheck '345'. Either method works!

Method 2: Using Calculated Fields for More Complex Logic

Sometimes, your criteria for deleting rows aren’t based on a single field. You might need to remove rows that meet a combination of conditions. For example, "delete all rows for the 'Office Supplies' category that were placed before 2021." A standard filter can get clunky here. This is where calculated fields shine.

The strategy is to create a new field that acts as a flag, labeling each row as either "Keep" or "Remove." You then filter your entire view based on this flag.

Here’s the process:

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

Step 1: Create a Calculated Field

Navigate to any worksheet (not the Data Source tab). In the Data pane on the left, right-click on an empty space and select Create Calculated Field.

Step 2: Write the Logic

A new window will open. Give your calculation a clear name, like "Row Filter." Then, write an IF statement that defines your logic. The formula should return two distinct values, such as TRUE/FALSE, "Keep"/"Remove," or 1/0.

Example A: Removing Based on Category and Date

To exclude office supply orders from before 2021:

IF [Category] = "Office Supplies" AND YEAR([Order Date]) < 2021
THEN "Remove"
ELSE "Keep"
END

Example B: Removing Rows with Negative Profit

Maybe you only want to focus on profitable transactions:

IF [Profit] < 0
THEN FALSE
ELSE TRUE
END

Pro-tip: A simpler way to write the same logic would just be [Profit] >= 0, as this expression itself will return TRUE or FALSE.

Step 3: Apply the Calculated Field as a Filter

Once you've created the calculated field, it will appear in your Data pane.

  1. Click and drag your new "Row Filter" field onto the Filters shelf.
  2. A dialog box will pop up asking which values you want to include.
  3. Check only the value that represents the rows you want to KEEP (e.g., "Keep" or "TRUE").
  4. Click OK. All rows flagged for removal will disappear from your view.

To apply this across your entire workbook, right-click the filter on the Filters shelf and select Apply to Worksheets > All Using This Data 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.

An Important Clarification: You're Hiding, Not Deleting

A crucial concept to understand is that Tableau is a non-destructive tool. When you use the methods above, you aren’t permanently deleting data from your underlying source file (like your Excel sheet, Google Sheet, or database).

Instead, you are telling Tableau to exclude that data from being loaded into its engine and used in visualizations. This is a powerful feature:

  • It's reversible. If you realize you made a mistake, you can simply remove the filter, and your data will reappear instantly. No harm done.
  • It's risk-free. You never have to worry about accidentally corrupting your original, raw data. The source of truth remains untouched.

If your goal is to permanently scrub rows from existence, you must do that outside of Tableau, directly in the database, spreadsheet, or file where the data lives.

Final Thoughts

Removing unwanted rows in Tableau is all about strategic filtering, not permanent deletion. Whether applying a simple exclusion on the Data Source tab or using a complex calculated field for conditional logic, cleaning your data is the first step toward building fast, accurate, and insightful dashboards. Mastering these techniques will help you stay focused on the signals, not the noise.

Thinking about how much time is spent on just cleaning and preparing data before the real analysis even begins can be daunting. At Graphed, we've built a platform that handles this automatically. Instead of clicking through menus and piecing together reports, we empower you to use simple, natural language to get answers from all your marketing and sales platforms. Just connect your data sources like Google Analytics, Shopify, or Salesforce, and ask, "Show me my revenue by campaign for last month, excluding our internal test Shopify orders." Our AI builds a live dashboard in seconds. If you want to spend less time wrangling data and more time acting on it, see how Graphed transforms your reporting process.

Related Articles