Union in Tableau: Create, Rename and Remove

Union in Tableau: Create, Rename and Remove

3 mins read1.9K Views Comment
Vikram
Vikram Singh
Assistant Manager - Content
Updated on Mar 29, 2022 10:33 IST

In this article, we have discuss union in tableau, how to create it manually and automatically using wildcards.

2022_03_tableau-union.jpg

Introduction

In this article, we will discuss unions in Tableau.

Mathematically, the union of two sets is the set containing all the elements of the given sets.

2022_03_union-of-set-A-and-B.jpg

In the tableau, we have tables so union in Tableau is used to combine two or more tables by appending values (rows) from one table to another.

For union in tableau, the tables must come from the same connection.

To read more about data connection in Tableau, read the article on Data Connection in Tableau.

Recommended online courses

Best-suited Tableau courses for you

Learn Tableau with these high-rated online courses

β‚Ή39.54 K
2 hours
– / –
45 hours
– / –
4 weeks
– / –
4 weeks
β‚Ή2.25 K
4 weeks
Free
12 hours
– / –
1 hours
β‚Ή19.89 K
16 hours
– / –
3 hours
β‚Ή19.7 K
6 months

Table of Content

What is union in Tableau?

Union is a method of combining data by appending rows of one table onto another table. 

Let’s understand the union by an example:

A dealer purchased motorbikes from different vendors through different payment methods in the month of January, February and March.

2022_03_data-of-a-dealer-union-in-tableau-1.jpg

Union of these tables will form a single table and append the tables

2022_03_union-in-tableau.jpg

How to create a Union in Tableau

In the tableau, while doing union all the tables have to be the same number of fields, same field names, and the fields are the same data type.

Union Tables Manually

In this method you manually drag the distinct table from the left pane to the union dialogue box.

Steps to union tables Manually:

  • Double click the New Union on the left side of the data source page
2022_03_new-union-in-tableau.jpg
  • Drag the table from the left pane to the union dialogue box
  • Select another table from the left pane, just below the first table

Note: To add multiple tables at a time, select ctrl (command) or shift, select the table you want, and drag below the first table.

  • Click Apply or OK to union

Union Tables using Wildcards

  • Wildcard setup search criteria to automatically includes tables in the union
  • * is used to match the sequence or pattern in the Excel workbook, google worksheet, text file names, json file names, .pdf file names, and database table name
  • This method is used to union files and folders across the folders and workbooks

Steps to union tables using Wildcard:

  • Double click the New Union on the left side of the data source page
2022_03_new-union-in-tableau.jpg
  • Click on Wildcard(Automatic) in the union dialogue box.
2022_03_wildcard-union-in-tableau.jpg
  • Enter the Search Criteria
  • Click Apply or OK to union

Rename a union

  • Double-click the logical table that contains union physical tables
2022_03_edit-union-in-tableau.jpg
  • Enter a new name for the union.

Add/Remove tables in Union

  • Double-click the logical table that contains union physical tables.
  • Click the union drop-down arrow and then select Edit Union.
  • You can drag additional tables that you want to union from the left pane, or hover over a table until the remove icon displays and then click the icon to remove the table.
  • Click Apply or OK to complete the task.

Remove a union

Double-click the logical table that contains union physical tables, and then click the union drop-down arrow and select Remove.

Conclusion

In this article, we have discussed union in tableau, how to create it manually and automatically using wildcards.

Hope this article will help you in your data analyst journey.

This article is a part of a complete tutorial of Tableau, focusing on Tableau certified data analysts and tableau desktop specialists. 

Through a series of articles, we will cover all the topics in-depth with examples.

Connecting data in Tableau
Create Table, line chart and Scatter Plot using Tableau Show Me
Data Types in Tableau
About the Author
author-image
Vikram Singh
Assistant Manager - Content

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio