How to Add a Clean Step in Tableau
Building a powerful dashboard in Tableau often feels like the glamorous final step, but the real, unsung hero of great data visualization is clean data. Inconsistent formats, extra spaces, or jumbled columns can stall your analysis before it even begins. This is where you can leverage the Clean Step in Tableau Prep, a built-in feature designed to help you methodically fix these common data issues. This guide will walk you through exactly how to add and use a Clean Step to transform messy data into a reliable foundation for your dashboards.
What Exactly is a Clean Step in Tableau Prep?
Working with data often requires you to do some janitorial work first - removing clutter, fixing typos, and standardizing values. A Clean Step in Tableau Prep is a dedicated stage within your data preparation "flow" where you perform these cleaning and shaping operations.
While you can perform some cleaning operations directly in your Input step, dedicating a Clean Step has a few key advantages:
- Organization: It bundles all your cleaning tasks into one logical, clearly labeled step. If you need to troubleshoot or adjust something later, you know exactly where to look.
- Reusability: You can see a running list of every change you've made, making it easy to edit, reorder, or remove specific cleaning actions without starting over.
- Clarity: It separates the process of connecting to your data from the process of cleaning it, making your entire data flow easier for you (and your teammates) to understand.
In a Clean Step, you can handle some of the most common data preparation tasks, including:
- Removing unwanted columns
- Filtering out irrelevant rows
- Trimming extra spaces from the beginning or end of text
- Standardizing capitalization (e.g., converting "new york" and "New York" to just "New York")
- Changing data types (e.g., from Text to a Number)
- Splitting one column into multiple columns
- Merging different columns into one
- Grouping inconsistent values into a single, standardized value (e.g., "U.S.," "USA," and "United States" all become "USA")
Think of it as your dedicated workshop for getting your data into perfect shape before sending it off for analysis.
How to Add a Clean Step to Your Flow: A Step-by-Step Guide
Adding a Clean Step is a fundamental part of building any workflow in Tableau Prep. Let’s walk through the exact process. For this guide, we’ll assume you’ve already connected to your data source and have an "Input" step in your flow.
Step 1: Open Your Flow in Tableau Prep Builder
Start by opening your project in Tableau Prep. You should see your initial data source displayed as an Input icon in the flow pane, which is the main canvas area at the top of the application.
Step 2: Select the Plus Icon
Hover over the right side of your Input step. A small plus (+) icon will appear. Clicking this icon reveals a menu of all the different step types you can add to your flow to branch off from your current step.
Step 3: Choose "Clean Step"
From the menu that appears, simply click on "Clean Step". Tableau Prep will immediately add a new step, visually connected to your Input step. The lower part of the screen, known as the Profile Pane, will populate with a summary of your data fields.
Step 4: Familiarize Yourself with the Clean Step Workspace
Once you've added a Clean Step, your workspace is divided into a few key areas:
- The Profile Pane: Each column from your data set is represented as a "profile card." This card gives you a quick visual summary of the data in that field, including a distribution of values and indicators of data quality. This is where you'll initiate most cleaning actions.
- The Toolbar: Above the Profile Pane, you'll find a toolbar with options for creating calculated fields, suggestions from Tableau Prep, and more.
- The Changes Pane: Located on the far left, this pane is invaluable. It automatically records every single cleaning operation you perform. This acts like a "history" feature, allowing you to edit, undo, or reorder any changes you’ve made.
- The Data Grid: At the very bottom, you can view your row-level data in a familiar spreadsheet-like grid. Changes you make in the Profile Pane will be reflected here in real-time.
Now that you've added the step and know your way around the interface, you're ready to start cleaning.
Practical Examples: Solving Common Data Problems
The best way to understand the power of a Clean Step is to see it in action. Here are three common scenarios you'll almost certainly encounter and how to solve them in just a few clicks.
Example 1: Fixing Inconsistent Punctuation and Capitalization
The Problem: You have a "Region" column meant for analysis, but the data entry is all over the place. You see values like " west", "East ", "north", and "South". These inconsistencies will cause Tableau to treat them as four distinct regions instead of grouping them correctly.
The Solution:
- In your Clean Step, locate the profile card for your "Region" column.
- Click the ellipsis (...) icon on the top right of the card to open the options menu.
- Navigate to Clean > Trim Spaces. This instantly removes all the leading and trailing spaces from every value in that column. You'll see the profile card update to reflect the change.
- Click the ellipsis (...) icon again.
- Go to Clean > Make Lowercase or Make Uppercase. This converts all text in the column to a single, consistent case. Now, "South", "south", and "SOUTH" are all treated as the same value.
Notice that as you perform these actions, they appear in the "Changes" pane. This gives you a clear, documented record of your data cleaning steps.
Example 2: Splitting a "Full Name" Column into Two
The Problem: You have a single column named "Customer Name" containing entries like "Sarah Davis" and "James Wilson." For your analysis, you need separate columns for "First Name" and "Last Name."
The Solution:
- Select the "Customer Name" profile card.
- Click the ellipsis (...) menu and choose Split Values.
- You'll be presented with two main options: Automatic Split and Custom Split. For names separated by a simple space, "Automatic Split" works beautifully. Tableau Prep intelligently identifies the space as the separator (the delimiter) and splits the column for you.
- After the split, Tableau will create two new columns, likely named "Customer Name - Split 1" and "Customer Name - Split 2."
- To make these more useful, simply double-click on the column titles and rename them to "First Name" and "Last Name," respectively. If you want, you can now remove the original "Customer Name" column by clicking its ellipsis menu and selecting Remove.
Example 3: Grouping Messy Categorical Data
The Problem: You're analyzing sales data by country, but your "Country" column is a mess. You have "USA," "U.S.", "United states", "United States of America," and maybe even typos like "Unted States." All of these represent the same place but will show up as separate countries in a chart.
The Solution using Group Values:
- In the "Country" profile card, right-click on one of the values, such as "USA".
- From the context menu, select Group Values.
- Tableau Prep's smart grouping feature will often automatically identify similar-sounding or similarly spelled values. You can simply review the suggestions and approve them to bundle them into a single category.
- For manual grouping, you can Ctrl-click (or Cmd-click on Mac) to select multiple values from the profile card that you want to group (e.g., click "U.S.", "USA", and "United states").
- Once selected, right-click on any of the highlighted values and select Group from the menu.
- Tableau Prep will combine these into a new, single value. You can then right-click on this new grouped value and choose Edit Value to name it something clean and clear, like "United States."
Quickly Managing Other Data Needs
The Clean Step is a versatile tool that can do more than just the examples above. Here are two other powerful operations you can easily perform in the same interface.
Changing Data Types
Sometimes Tableau Prep misinterprets a column's data type. For instance, a "Product ID" column might be read as a Number when it's really just a Text identifier, or a "Sales" column filled with currency figures might be identified as Text. Having the correct data type is essential for calculations and accurate analysis.
To fix this, simply click the data type icon at the top left of any profile card (e.g., "#" for Number, "Abc" for String/Text, or a calendar icon for Date). A dropdown menu will appear, allowing you to select the correct data type.
Creating New Fields with Calculated Fields
You can also create new columns based on existing ones directly within a Clean Step. By clicking the Create Calculated Field button in the Toolbar, you can open an editor to write formulas. For example, if you have "Sales" and "Cost" columns, you could create a "Profit" column with the simple formula:
[Sales] - [Cost]This adds a brand-new, calculated column to your dataset right then and there, without needing to go back to your original source file.
Final Thoughts
Mastering the Clean Step in Tableau Prep is a massive step toward creating dashboards that are accurate, reliable, and trustworthy. By methodically organizing your cleaning operations, you're not just fixing data for a single report - you're building a repeatable, easy-to-understand process that will save you countless hours down the line.
While tools like Tableau Prep are fantastic for hands-on, detailed data preparation, we know that the biggest challenge for marketers and sales teams is often just pulling data together from a dozen different platforms in the first place. My team and I built Graphed to solve this by automating the entire analytics workflow. Instead of manually cleaning and linking data from sources like Google Analytics, Shopify, and your CRM, you can connect them to our platform and create real-time dashboards simply by asking for what you need in plain English - no manual data prep required.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?