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: 

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:

  1. Open Tableau Desktop and chose Microsoft Excel from the list of connectors.
  2. Select the Sales 2015.xlsx file.
  3. Replace Sheet1 with New Union:

  1. Select the second tab, Wildcard, and configure it to include all the sheets named Sheet1, and all the Excel Workbooks starting with Sales by writing Sales *.xlsx (use the * symbol to represent any other characters). Your configuration window should look like this:

As you can see, you can also expand the search to the subfolders or parent folders.
  1. That's it! To test the Wildcard Union, you can create a new visualization that displays the Year of Order Date and the Sales, with the Path of the different files: 

Wildcard Unions are very practical. Use them as often as you can! The only rule is to be careful with the patterns, so you don't include things you don't want! 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.100.89