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

Reflecting on my time in DataSchool Training

3 mins read

Fri 22 Nov 2019

Dashboard Week, Day 4: Cheating on Tableau

2 mins read

Thu 24 Oct 2019

Dashboard Week, Day 3 – Back to Bars

2 mins read

Wed 23 Oct 2019

Dashboard Week, Day 2: Scraping by...

3 mins read

Tue 22 Oct 2019