What is a Data Union in Tableau?

Cody Schneider6 min read

Combining data from different spreadsheets or files for a complete analysis can feel like a chore. If you have monthly sales reports, regional performance data, or weekly logs spread across multiple tabs or files, piecing them together is often the most time-consuming part of a project. In Tableau, the Data Union feature is designed to solve this exact problem efficiently.

This article will walk you through exactly what a Tableau Data Union is, why it's so useful, and how to create one step-by-step. We'll also cover common use cases and best practices to help you get the most out of this powerful feature.

What Exactly is a Data Union?

A Data Union in Tableau combines two or more tables by stacking them on top of one another. Think of it as appending rows from one table to the bottom of another. This is also known as a vertical combination of data.

The key requirement for a successful union is that the tables must have a similar structure - meaning they should share the same (or mostly the same) column headers and data types. For example, if you have four separate quarterly sales reports in different CSV files, each with columns like Date, Product ID, Region, and Sales, a union allows you to stack these four files into one large, year-long table within Tableau.

Tableau automatically generates two additional fields when you create a union: Table Name and Sheet Name. These fields identify the source of each row, which is incredibly helpful for filtering and analysis later on.

The Golden Rule: Unions Add Rows, Joins Add Columns

It's vital not to confuse a union with a join. This is one of the most common hang-ups for new Tableau users.

  • A Union stacks data vertically, increasing the total number of rows. You use it when your data sources have the same columns but different rows (e.g., combining monthly sales reports).
  • A Join stitches data together horizontally, increasing the total number of columns. You use it when your data sources have different columns but share a common field (e.g., combining a Customer table with an Orders table using CustomerID as the key).

If you remember that "Union stacks" and "Join adds," you'll have a clear understanding of when to use each one.

How to Create a Data Union in Tableau: A Step-by-Step Guide

Creating a union is a straightforward drag-and-drop process in Tableau's Data Source pane. You can do this manually for a few files or use a "wildcard union" to automatically combine many files at once.

Method 1: Creating a Manual Union

Use the manual method when you have a small, fixed number of tables or sheets to combine.

  1. Connect to Your Data: In Tableau Desktop, connect to your data file (e.g., an Excel file, a CSV, or a Google Sheet).
  2. Drag Your First Table to the Canvas: From the left-hand pane, find your first table or sheet (e.g., "January Sales") and drag it into the logical table canvas area. This establishes the primary table for your union.
  3. Drag Subsequent Tables to Union: Now, drag a second table (e.g., "February Sales") and hover it directly below the first table in the canvas. You will see an orange "drag table to union" box appear. Drop the second table onto this box.
  4. Repeat for All Tables: Continue dragging and dropping other tables ("March Sales," etc.) onto the same union area. Each one will be appended to the bottom of the unioned table.
  5. Verify the Union: Once you're done, browse your data preview. You’ll see the new data appended, as well as new columns for Table Name and Sheet Name.

You have now successfully created a single data source from your multiple tables.

Method 2: Creating a Wildcard Union

The wildcard union is a lifesaver when you have many files that follow a consistent naming convention, especially for reports that are generated regularly (e.g., daily or monthly).

Let's say you have a folder filled with monthly reports named Sales_Report_Jan2024.csv, Sales_Report_Feb2024.csv, and so on.

  1. Connect to your Data: Connect to a text-based file like a CSV file. Once you've selected your file, proceed to the next step.
  2. Open the Union Editor: In the left pane, drag the "New Union" option into the canvas instead of dragging individual tables.
  3. Choose the Wildcard Option: A dialog box will appear with an option for Wildcard at the top.
  4. Define the Wildcard Search: In the textbox, enter the common part of the filenames followed by an asterisk. For instance, you could enter Sales_Report*.csv. This tells Tableau to union any file that starts with "Sales_Report" and ends with "csv".
  5. Hit 'OK' or 'Apply': Tableau will scan the folder and automatically union the files that match the criteria.

Common Use Cases for Data Unions

Here are some examples where Tableau data unions can be incredibly useful:

  • Aggregating Monthly or Quarterly Reports: If your organization works with several quarterly or monthly reports, you can use unions to combine these reports into a large, comprehensive dataset for analysis.
  • Combining Regional Performance Data: Say you operate in multiple regions and have separate reports for each. A union allows you to combine this data into a single dataset for a global view of performance.
  • Aggregating Data from Multiple Servers: A tech company might gather data from multiple web servers. A union allows you to aggregate data from all servers and analyze overall system performance.
  • Making Evaluative Comparisons: A company comparing the same sequence over years can union datasets to analyze results in aggregate. This provides insight into trends by comparing the same dataset with added new yearly data.

Unions vs. Joins: When to Use Each

It's helpful to understand when a union is appropriate as opposed to a join, as each serves different purposes.

  • When to Use a Union: Employ this when dealing with structured data that are in similar formats but stored separately.
  • When to Use a Join: Use a join when your data sources have a common field, like 'CustomerID', to combine rows into a single entity.
  • Core Requirements for Unions: Similar structures with the same column headers.
  • Core Requirements for Joins: Must have a common field to link the data effectively.

Best Practices for Using Data Unions in Tableau

Optimize your workflow and avoid common pitfalls with these best practices:

  • Standardize Your File Names: To utilize the most from wildcard unions, ensure that your files have the same naming format.
  • Check for Data Types: Ensure that the data is consistent across files to prevent issues in your unioned dataset.
  • Leave Flexibility for Unions: When applying wildcard unions, any new files added to your folder automatically become part of the union.
  • Use the Table Name Field: To emphasize the origin of records, utilize this field for filtering or categorizing data.

Final Thoughts

Using Tableau's data unions simplifies the process of consolidating similar-structured datasets, saving you time and minimizing mistakes in your analysis. Whether you are dealing with aggregated files into unified datasets, unions simplify your ability to analyze and visualize huge volumes of data.

Explore Graphed to help manage data consolidation efficiently. Our platform empowers you to address complex analytics without needing to master multiple languages. Graphed is designed to be simple yet powerful, enabling you to transform your data analysis tasks into a more manageable process.

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.