Union in Tableau: Create, Rename and Remove

Union in Tableau: Create, Rename and Remove

3 mins read1.9K Views Comment
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

Free
3 hours
Free
21 hours
Free
5 hours
Free
– / –
39.54 K
2 hours
– / –
– / –
Free
19 hours
8.4 K
3 weeks
Free
2 hours
– / –
– / –

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
Connecting data in Tableau
In this article, we discussed connecting data in tableau, how to connect files and servers to a tableau with steps on how to connect excel files, how to connect MySQL...read more
Create Table, line chart and Scatter Plot using Tableau Show Me
Create Table, line chart and Scatter Plot using Tableau Show Me
In this article we will discuss Tableau Show me . Show me is the advanced visualization tool in Tableau to make data visualization easy without writing any custom codes.
Data Types in Tableau
Data Types in Tableau
Tableau supports 7 types of data types String values, Date values, Date & Time values, Numeric values, Boolean values, Geographical values, Cluster or mixed values. Tableau supports 7 types of...read more
About the Author