Combining Data Sources in one Visualization
Sometimes you need Data Blending to extract value from more than one data source in the same Analytics 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.
Follow these steps to combine two data sources in one visualization:
Open the Data Blending dialog.
Click/Tap the + button in the Fields section and select Fields from another Data Source.
Choose the new Data Source.
Connect to the data source that you want to combine.
Specify the JOIN Condition
Configure the equality condition that needs to match to combine the two data sets.
Choose the fields you want
Specify which are the fields that you want to combine, so you can access them in your visualization.
Select Join Data
After merging the two data sets, you can find the new fields at the bottom of the Fields section.
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 Analytics is LEFT (OUTER) JOIN.
Below you can see how the Vacation (left table) and the Departments (right table) data sets are joined, using the DepartmentId field in both tables as the relationship between them (equality condition: DepartmentId = DepartmentId).
Before JOIN operation:
After JOIN operation:
|Taken (days)||DepartmentId||DepartmentId||Department (name)|
Notice that LEFT JOIN operation returns all records from the left table, and keeps only matching records from the right table.