Book Image

Learning Tableau

By : Joshua N. Milligan
Book Image

Learning Tableau

By: Joshua N. Milligan

Overview of this book

Table of Contents (18 chapters)
Learning Tableau
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
8
Adding Value to Analysis – Trends, Distributions, and Forecasting
Index

Joins and blends


Joining tables and blending data sources are two different ways to link related data together in Tableau. Joins are performed to link tables of data together within a single data source. Blends are performed to link together multiple data sources.

Joining tables

Most databases have multiple tables of data that are related in some way. Imagine you have been asked to analyze data in a simple database at a hospital with four main tables, related like this:

The primary table is the Visit table that has a record for every visit of a patient to the hospital and includes details such as the start and end dates and the type of visit (for example, inpatient, outpatient, ER). It also contains key fields that link a visit to a patient, a treatment, and a physician. You have confirmed that every visit has a patient and a physician, but some visits do not necessarily result in a treatment.

When you connect to the database in Tableau, you'll see the four tables listed on the left. Always...