Learn

Okay, we’ve covered how to load a data file into Tableau. But what if a single data file doesn’t have all the variables we need to answer a question?

Maybe we have all the data we need but it’s in multiple files or tables. Tableau allows us to use data from multiple files using its Relationship feature to automatically (or manually) join files on a common field.

Sticking with our Tree Census dataset, let’s say we wanted to be able to show whether trees are native species or not. If we just so happen to have a dataset with each tree’s Latin name and its native species status, we can do just that! All we have to do in Tableau is ensure that the two tables form a Relationship based on their shared column.

Instructions

  1. Download the Tree Species data set and save it in the same folder as your Tree Census data file.
  2. Click the Data Source tab on the left bottom of your screen. Data Source Tab
  3. In the File sidebar, you will see your tree_species_nyc.csv source. Drag that file and drop it next to the Tree census box. You will see an orange “noodle” that is showing us a relationship can be made. It will look like we made an error, but don’t be alarmed. Join Error
  4. Your data sources have a common field, but they don’t share the same name, so Tableau isn’t sure how to join these two. We can fix this by manually assigning which fields Tableau uses. Go to the Select a field option in the bottom left of your window. Common Field Detail
  5. In the left dropdown select Spc Latin. In the right dropdown select Scientific name. This should remove the error so that you can explore the data from both sources. Successful Relationship Look at that! Now we’ve got access to all the information from both datasets!

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?