When I built my Data School application dashboard, I dumped my raw, messy data straight into Tableau Desktop and cleaned it on the fly. By splitting strings here and creating calculations there I had managed to clean and prepare my data. It felt efficient at first, but the the more data I included, the slower my workbook began to crawl. Very quickly into my time at the Data School I was introduced to Tableau Prep.
Think of Tableau Prep as a visual, drag-and-drop workshop designed to clean, shape, and combine dirty data before it ever reaches your charts. Instead of writing complex SQL scripts or cluttering your Tableau Desktop workbooks with endless calculations, Prep gives you a step-by-step visual flow.
A Real-World Example: The Tricky String Split
Imagine your raw dataset contains an unformatted order code column structured like 2025-US-98412_Enterprise . You need to isolate the Year, Region, Customer ID, and Segment into separate fields.
- The Tableau Prep Approach: You add a Clean Step, click the column, and select Split > Custom. Prep automatically parses the delimiters (
-and_), previews the four clean fields, and lets you rename them visually. - The Tableau Desktop Approach: You end up writing four separate calculated fields using nested
SPLIT()orMID()functions:
SPLIT(SPLIT([Order Code], '_', 1), '-', 2) // Extracts "US"
While this does work, Desktop then needs to execute these string calculations row-by-row across millions of records every single time an end-user clicks a filter or updates a visual. Performance tanks quickly.
Because Prep processes this upstream and includes the results directly into a .hyper extract, Desktop receives the ready-to-use columns. This means zero runtime calculation needed.
When to Use Which Tool
Clean in Tableau Prep if:
- Splitting, trimming, or regex parsing text across large datasets.
- Pivoting multi-column spreadsheets from wide to tall or performing multi-file unions.
- Cleaning data once so multiple workbooks can consume a single, gold-standard data source.
Clean in Tableau Desktop if:
- Calculations that rely on real-time user parameters or interactive filters.
- Level of Detail (LOD) formulas or Table Calculations tied directly to a specific visual layout.
- Renaming headers or tweaking visual groups on the fly during rapid prototyping.
Pushing that heavy cleanup into Tableau Prep is a game-changer. It keeps your workbooks light, your workflow easy to follow, and saves your users from staring at a spinning wheel waiting for their dashboard to load.
