Connecting Data: Unions

by Matthew Armstrong

A Union describes the process of appending one table below another to make a longer table. The most obvious use case is adding new entries to a pre-existing table in order to update figures and re-do analyses. Here’s how it looks in Tableau:


When you drag an additional sheet below the one in the view (Central Stock Purchases in this example) Tableau prompts you to Union them.

The way Tableau performs the Union is by looking for fields with matching names and aligning the tables on this match. Here’s how this works:

Tableau matches the columns and automatically aligns them to avoid duplication. The columns that don’t match are also kept, and the new table is populated with the data from the original tables. Notice how Profit is fully populated since both tables had a Profit column, but Sales is only partially populated as only the left table had a Sales column.

Hopefully this gives you a better understanding of what the Union process is and when to use it!

Avatar

Matthew Armstrong