Unions

A union is another way to combine your data. When you union two tables, you append the rows from one table to another. Since you are effectively stacking tables on top of each other, there is one important condition that must be satisfied – the data types of the columns that will be stacked need to be compatible. You should not stack a date column on top of a text column.

The following table includes a description of a union along with a Venn diagram visual to help you visualize how a union operates:

Union Description Venn diagram of Union
Union The result set of a union is all records from the first table appended to all records from the second table.

To illustrate unions, we will append the Orders table to itself; this ...

Get Tableau Desktop Certified Associate: Exam Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.