By default, charts in Data Studio get their information from a single data source. Blending lets you create charts based on multiple data sources, called a blended data source. For example, you can blend two different Google Analytics data sources to measure the performance of your app and website in a single visualization.
Blending can reveal valuable relationships between your data sets. Creating blended charts directly in Data Studio removes the need to manipulate your data in other applications first, saving you time and effort.
Quick start resources
Blended data example report
Click the example report below to see how you can join data from 2 different spreadsheets.
How blending works
You create a blended data source by joining the records in one data source to the records of up to 4 other data sources. To join the data, each data source in the blend must share a set of one or more dimensions, known as a join key. Blended data sources include all the records from the leftmost data source in the Blend Data panel, and the records from the data sources to the right that share the same values across the join key.
For example, the screenshot below shows the Blend Data panel with 3 data sources: Website A, Website B, and Mobile Apps A. The join key is the Source dimension. The blended data source created from this includes all the records from Website A, along with any records from Website B and Mobile Apps A that share the same Source values as Website A.
Blending is a left outer join
In data science terms, a blended data source is the product of a left outer join operation. In a left outer join of table A and table B, the result is all the records of Data source A and those records in Data source B that share the same key values.
The diagram below illustrates a left outer join of data sources A and B. The blended data source includes all the records contained by the green circle.
Blended data sources are report-only
Blending may return more rows than the original data
Blended data sources include all the records from the leftmost data source in the Blend Data panel, as well as all the records from the data sources to the right that share the same values across the join key. When there are multiple matches for the join condition, this can result in more rows appearing in the blended data than exist in the leftmost data source.
Blend using multiple dimensions
You can blend data sources using multiple dimensions as the join key. Each data source in the blend must have the same set of dimensions used in the key. Here's an example:
In this blend, only the records from Store Orders that match both Sales Rep ID and Region in Sales Reps will be included in the data source.
Blend a data source with itself
You can blend a data source with itself. To do this, add the same data source more than once in the Blend Data panel.
For example, the Google Analytics connector contains metrics for 1 day active users, 7 day active users, and 28 day active users. But, due to a limitation of Analytics, you can only have one of these metrics in a chart at a time. By joining the same Analytics data source with itself, you can add each of these metrics to the blended data source. You can then compare each of these active users metrics in the same chart.
Create calculated fields in a blended data source
You can create a calculated field in the data blending configuration. To do this, create or edit a blended data source, then:
- In the data source that provides the fields to be used, in the calculation, click Add dimension or Add metric.
- Click CREATE FIELD.
- Type in the formula in the editor window, then click APPLY.
Creating calculated fields on a blended data source can be convenient when configuring join keys if the columns in your data sources aren’t perfectly compatible (for example, differently formatted dates or mismatched capitalization). It can also be useful for reports based on reusable data sources as report editors don't need access to that data source and can create calculations on the blended data source instead.
Limits of creating calculated fields on a blended data source
Calculated fields in a blended data source can only be used on the inner tables that make up the blend, and can only reference fields in that inner table.
You can't reference the calculated fields you create in other calculated fields in the same blended data source.
Use blending to reaggregate data
Calculated fields that are the result of aggregation functions generally can't be reaggregated (they have a type of Auto, which can't be changed). You can work around this by using data blending. Learn how.
Manage blended data sources
Blended data sources in a report are listed in the DATA tab of the properties panel, under Component Data Sources.
You can check the status of and remove blended data sources using the Resources > Manage blended data menu.
Limits of blending data
Blended data sources belong to the report in which they were created. To reuse a blended data source in another report, copy and paste a component with blended data into the new report.
You can blend up to 5 data sources in a chart.
Blending data currently only supports left outer join operations.