The Data analysis is usually performed by combining data from multiple data sources or different tables in a single source. In Tableau the Data joining is accomplished by using the DATA -> DATA SOURCE -> EDIT CONNECTION. Tableau provides several ways to perform the data joining depending upon the requirement.
Generally, four types of joins can be performed in Tableau.
Let us see the Tableau Join Creation in the below section.
Join Creation in Tableau
Let's create the Tableau Data joining by using the Data set ‘Sample superstore’. To create the join we will use the Orders and Returns tables and the steps are as below.
First, we will load the "Sample superstore" data set in Tableau as mentioned in the below figure. Click on the "Microsoft Excel" data source and select the data set that comes default with Tableau and is present under C:\Users\Documents\My Tableau Repository\Datasources\2021.2\en_US-US folder.
Now Drag the first table "Orders" to the canvas as mentioned in the below figure.
Once the data is loaded the below output will come.
Now open the join canvas by double-clicking the first table or by selecting Open from the menu.
Once the join canvas has been opened it will look like the below figure.
Now drag another table named "Returns" into the join canvas as shown in the below figure.
The inner join will be created based on the Order ID field from both tables as mentioned below in the figure.
Now let us see the various type of Tableau Joins in the following section using the above example.
1. Tableau Inner Join
The Inner join is used to project the output that matches in both tables. In the below example when we click on the join icon the different types of joins will be projected. When we select the inner join the below output will come.
2. Tableau Left Join
The Left join is used to show all data from the left table along with the matching rows from the right table as we can see from the below figure.
3. Tableau Right Join
The Right join is used to show all data from the right table along with the matching rows from the left table as we can see from the below figure.
4. Tableau Full Outer Join
The Full Outer join is used to show the results from both tables. In case the values are not matching then a null value is shown.