A data relationship in Tableau is a flexible way of combining data from multiple tables or sheets for analysis in tableau.
A relational database (Which contains digital information) or Excel file consists of multiple Tables and sheets.
The multiple tables and sheets are connected to each other in Tableau using the data relationship concept. This connection can be established by Join or Union features present in Tableau. The relationship between data in two or more tables has to be specified while joining tables.
In this article you are going to learn the following things :
Combining data from two or more tables to a single table by using joining conditions. The joining operation is very common in data analysis, you may need to join the data from multiple sources, the Tableau provides the join feature to join tables present in the tableau. You can join up to 32 tables present in the data source.
While joining, the relationship between two or more tables can be specified. The tables present in the data source can be related to each other using the joins such as inner join, left join, right join, and outer join.
The functionalities of Join types are explained below :
Example: Consider there are two tables TableA and TableB containing customer details and another one is containing Employee details as below.
The Ven diagram for inner join:
Left Join :
The Ven Diagram for Left join:
Right Join :
The Ven Diagram for Right join:
Outer Join :
The Ven Diagram for Outer join:
The union is a method for combining data by appending rows of one table onto another table. For example, you might want to add new transactions in one table to a list of past transactions in another table.
Make sure the tables you union have the same number of fields, the same field names, and the fields are the same data type.
In most of the cases, tables with the same headers are appending together using the union function. To perform union operation on two or more tables we don't need any joining conditions.