Week 1 Presentation Joins in Tableau Prep

As their first week draw to a close DS40 arrived in on Friday morning to be greeted with their first challenge, give a presentation to yourself one week ago explaining Joins. Often when we encounter data it is not all in the same file. There are two main ways this can be resolved.  Joins which add new categories (Columns )(making the table wider )  and Unions that add new data points (rows, making the table taller). In this blog, we will be exploring the former with cat names their breeds, and cuteness.

                           Table 1 Names and Breeds, Table 2 Names and Cuteness

Table 1 Table 2

1-We upload both data sets to Tableau prep.

2-Add a clean stage to allow us to view the data from each file within Tableau Prep.

3-Join them together, and select the field which we will be using to Join this is normally the common field between the two data sets. (in our case cat names)

4- Using the clickable Venn diagram interface on the left-hand side select the type of join that you wish to use.

(i) Inner Join: This will "pull through " all the cats which appear in both data sets in this case Ginger and Jess will exist in our output whilst Pyraa and Minne will be excluded.

Illustration of an Inner join 

(ii) Left join: This will "pull through " all the cats which appear in both data sets and those that appear in the left and set this case Ginger and Jess will exist in our output from the overlap whilst  Pyraa will be pulled from the left whilst Ginger will be excluded as she only exists in the right-hand field

Illustration of a Left Join 

(iii) Right Join: This will "pull through " all the cats which appear in both data sets and those that appear in the right-hand set this case Ginger and Jess will exist in our output from the overlap whilst  Minnie will be pulled from the right whilst Pyraa will be excluded as she only exists in the left-hand field.

Illustration of a Right Join 

(iv) Outer Join: This will "pull through " all the cats which appear in only one of the data sets in this case Pyraa and Minnie will exist in our output. Whilst Ginger and Jess be excluded as they are present in the overlap.

Illustration of an Outer Join 

(v) Full Join: This will "pull through " all the cats which appear in either one of the data sets in this case all the cats will appear and non will be excluded.

If you are a Tableau Prep Beginner I would encourage you to remake the data sets and try to make each of the joins yourself in Prep.

Author:
Olivier Newman
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab