Connecting Data: Unions

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!

Author:
Matthew Armstrong
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab