It is often necessary to combine data from multiple places—different tables or even data sources—to perform a desired analysis. Depending on the structure of the data and the needs of the analysis, there are several ways to combine the tables.
- To create a join, connect to the relevant data source or sources.
- These 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, Tableau colors the tables in the canvas and the columns in the data grid to show you which connection the data comes from.
- Drag the first table to the canvas.
- Select Open from the menu or double-click the first table to open the join canvas (physical layer).
- Double-clicking a table on the relationship canvas opens the join canvas
- Double-click or drag another table to the join canvas.
- If your next table is from another data source entirely, in the left pane, under Connections, click the Add button ( in web authoring) to add a new connection to the Tableau data source. With that connection selected, drag the desired table to the join canvas.
- Click the join icon to configure the join. Add one or more join clauses by selecting a field from one of the available tables used in the data source, choosing a join operator, and a field from the added table.
- Note: You can delete an unwanted join clauses by clicking the “x” that displays when you hover over the right side of the join clause.
- When finished, close the join dialog and join canvas.