Joins in Tableau

Joins in Tableau are used to combine data from multiple tables based on a common column. Let us understand with some examples. We will begin with the types of joins supported in Tableau.

Types of Joins

  1. Inner Join: Returns only the rows that have a match in both tables.
  2. Left Join: Returns all the rows from the left table and the matching rows from the right table.
  3. Right Join: Returns all the rows from the right table and the matching rows from the left table.
  4. Full Outer Join: Returns all the rows from both tables, with nulls where there are no matches.

The below figure represents the same:

Joins in Tableau

How to create Joins in Tableau

Let us create Joins. Open Tableau, create a new Tableau Workbook, and save it. We have saved it and given it the name Amit_Tableau_Joins.twb.

We connected the data and added the Sample – Superstor.xlsx.

Note: The Data Connection can be in the same data source (such as tables in a database or sheets in an Excel spreadsheet) or different data sources (this is known as a cross-database join). If you combined tables using a cross-database join,

First, we dragged the Orders table only to the canvas:

1. Drag the Orders Table to the Canvas in Tableau

We successfully dragged:

2. Orders table visible in Tableau

Now, we will drag the People table also from the left. While dragging, a line will be visible displaying that the two tables are being joined.

This will combine both People and the Orders table with Joins:

3. Orders and People table joined in Tableau

As you can see, based on the column Region, both the tables have been joined:

4. Field that joined both the tables in Tableau

Now, let us get records from both the tables.

For that, click on Sheet 1 below and create a new sheet. On the left, we can now see the fields of both tables:

5. Both the tables are now visible in Tableau

Let us get the regional managers for the states. Drag the State column from the Orders table to the Rows shelf. After that, drag the Regional Manager column from the People table to the Rows shelf:

6. Using Joins in Tableau

Now, the list of the Regional Managers is visible by joining both tables.


If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

Roadmap
Tableau - Numeric Calculations
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading