Version

Combining Data Sources in one Visualization

Sometimes you need Data Blending to extract value from more than one data source in the same Reveal visualization.

For example, you may want to compare vacation days taken with other employee absences by department, to gain insight about the correlation of those variables.

DataBlendingExample_All

Adding Fields from another Data Source

Follow these steps to combine two data sources in one visualization:

  1. Open the Data Blending dialog.

    Click/Tap the + button in the Fields section and select Fields from another Data Source.

    DataBlendingOpenDialog_All
  2. Choose the new Data Source.

    Connect to the data source that you want to combine.

  3. Specify the JOIN Condition

    Configure the equality condition that needs to match to combine the two data sets.

    DataBlendingJoinCondition_All
  4. Choose the fields you want

    Specify which are the fields that you want to combine, so you can access them in your visualization.

    DataBlendingChooseNewFields_All
  5. Select Join Data

    After merging the two data sets, you can find the new fields at the bottom of the Fields section.

    DataBlendingResult_All

    As shown in the image above, you can now visualize vacation days by Department name instead of using the internal Department ID.

The JOIN Condition

When adding fields from other data sources, you actually join two different data sets. The join operation used by Reveal is LEFT (OUTER) JOIN.

Below you can see how the Vacation (left table) and the Departments (right table) data sets joined, using the DepartmentID field in both tables as the relationship between them (equality condition: DepartmentId = DepartmentId).

Before JOIN operation:

Vacation

Departments

Taken (days) DepartmentId

40

1

92

10

DepartmentId Department (name)

1

CPA

100

HR

After JOIN operation:

Taken (days)

DepartmentId

DepartmentId

Department (name)

40

1

1

CPA

92

10

Notice that LEFT JOIN operation returns all records from the left table, and keeps only matching records from the right table.