Wildcard Union
The first time you saw how to create Unions, you had to select the different tables of the same dataset. Wildcard Unions allow you to create more powerful Unions that automatically add all the files and all the tables that match a specific pattern. This kind of Union is convenient as you don't have to add the new Tables manually, you only need to refresh the Data Source.
As an example for Wildcard Union, I split the Sample-Superstore
Excel file into four files, one for each year, and I put it in a folder named Sales
as displayed here:
Note
To reproduce the following example, you need to download the Sales
zip file available on the website, book.ladataviz.com, in the Chapter 12 section or use this link: https://ladataviz.com/wp-content/uploads/2018/09/Sales.zip.
Let's Union those files:
- Open Tableau Desktop and chose Microsoft Excel from the list of connectors.
- Select the
Sales 2015.xlsx
file. - Replace
Sheet1
withNew Union
:
- Select the second tab,
Wildcard
, and configure it to include...