The four basic SQL join types are all supported by Tableau: inner, left, right, and full outer. Prior to joining data, you must verify that the data types from the common field used in the join are the same:
Type of join | Description | Venn diagram of join |
Inner join | The result set includes all records that have a matching value in both tables. For the Global Superstore Orders 2016 example, this will return all records from the Orders table for which there is a matching person in the People table. | |
Left join | The result set includes all records from the left table (Orders) and matching records from the People table. For records where there is no match, NULL values will appear. | |
Right join | The result set includes all records from the right table (People) and matching records from the Orders table. For records where there is no match, NULL values will appear. | |
Full outer join | The result set includes all records from both tables regardless of whether there is a match or not. |
The maximum number of tables that can be joined in Tableau is 32. Tables also have a limit of 255 columns.
Some instructions for joins are as follows:
- Click and drag (or double-click) the second table from the left pane onto the canvas.
- Tableau will automatically attempt to detect a common field from both data sources in order to join both tables.
- Click the Join icon to change the join type or to change the join operation by adding/removing additional clauses. When finished, close the Join dialog box.
- Validate the join so that the data pane will reflect how you want the data to be ingested by Tableau in the data grid. To remove a join, click the x button icon by the join condition.
Next, we will move on to a similar type of join – the cross-database join.