Joining Tables


1. Table joins

>> 4 types of joins in Tableau

  • inner joins (default)
  • left joins
  • right joins
  • full outer joins

>> How to join tables?

[Tableau Help] – Join Your Data (中: 联接数据 / 한: 데이터 조인)


Two situations :

  • Join tables in the same data database

  • Join tables in different databases

    Connecting to multiple databases:

    • blue: primary database
    • orange: secondary database
    image-20210603084026249

How to join tables?

  1. Connect to the relevant data source or sources

  2. Drag the first table to the canvas

  3. Select [Open] from the menu or double-click the first table to open the join canvas

    image-20210603165714869 image-20210603165828247
  4. Double-click or drag another table to the join canvas

  5. Select a join type --> Add one or more join clauses

    image-20210603170308172


2. Joining Tables Using Calculations

>> When we use Join calculations?

Join calculations are typically used to fix mismatched field types, or just a mismatch in the values in the two tables when adding the join clause.

We can use Join calculation to create a new field that match the field use for join clause in the other table


[Example]

We have [Name] field in table A, [First Name] and [Last Name] fields in table B. To join these two tables:

  • Use Join calculation to create a new field “[Name]” for table B, which will be used for matching the [Name] field in table A

  • Join calculation function:

    [First Name] + " " + [Last Name]