You can create charts that show data from multiple data sources. In Data Studio, this is called blending data. There are two ways to create a chart with blended data:
Add data sources to an existing chart
This method blends new data sources into an existing, single data source chart.
- Edit your report.
- Select an existing unblended chart.
- On the right, in the Data Source section of the DATA properties panel, click +BLEND DATA.
This creates a blended data source. The Blend Data panel opens, where you can configure the blended chart by adding more data sources, specifying the join keys, adding or removing fields, etc. See below for details.
Create a blended chart from a selection of charts
This method creates a blended chart by automatically joining the data from multiple charts. Note that the charts you select can't already have blended data sources attached.
- Edit your report.
- Select up to five charts.
- Right-click the selected charts.
- From the menu, select Blend data.
This also creates a new blended data source that joins the data sources of the selected charts. You can customize the blend by editing the blended data source, as described below.
The chart you select first becomes the leftmost chart in the blend. You can shift the data source positions to make a different data source the leftmost.
Trying to create a ratio metric?
Blending 2 scorecards automatically creates a ratio metric, using the first chart you select as the numerator and the second chart as the denominator. For example, blending Costs and Clicks metrics automatically calculates your cost-per-click ratio:
- Cost scorecard. Select this chart first.
- Clicks scorecard. Select this chart second, then right click and select Blend data.
- Blended Cost / Clicks scorecard. Change the Type to Currency and adjust the Decimal precision to 4 places.
Edit a blended data source
Blending data in a chart creates a blended data source and attaches it to the chart. To edit the blended data source:
- Edit the report.
- Select the chart that uses the blended data source.
- In the DATA properties tab, under Data Source, click to the left of the data source name.
This opens the Blend Data panel, where you can configure the blended data source.
Add a new data source
You can blend up to five data sources in a single chart.
To add a data source, click ADD ANOTHER DATA SOURCE in an empty data source panel.
Select a different data source
Click the data source name in a panel to select a different data source. You can select any data source that has already been added to the report. You can also add any data source to which you have access.
If the new data source has different fields from the old one, you may see missing fields in the join key.
Shift a data source
The position of a data source in the Blend Data panel matters: data sources to the left take precedence over those to the right when selecting records to join. The leftmost data source provides the master set of records to include in the blend, while records in data sources to the right are included only if they match the join keys.
To shift a data source, in that data source's panel, click More , then click Shift left/right.
Remove a data source
To remove a data source, in that data source's panel, click More , then click Remove data source.
Removing a data source only removes it from the blended data, not from the report.
Edit the join key
When you create a blend from a set of charts, Data Studio automatically creates a join key for you. You can change how the data sources are joined by adding to or removing dimensions from the join key.
When customizing the join key, only select fields that exist in all the data sources. The field names can differ, but the data must match in order to establish the relationship between the data sources. For example, you could use fields called "Date" in one data source, and "Day" in another as long as both fields contain matching dates.
To add a dimension, drag it from the Available Fields list to the right of each data source panel. (If the Available Fields panel is hidden, expand it by clicking >.)
To remove a dimension, hover over it and click .
Missing fields in join keys
If Data Studio can't join your data with the currently selected dimensions, you will see one or more pink "Missing" fields in the join key. To fix this, add different dimensions to the key, or remove the missing fields.
Add fields to the blended data source
A blended data source contains only the fields you specify. The Fields to include in data source section of each data source panel shows the fields contributed by that data source. You can see the complete list of fields in the blended data source on the far right, under Included Fields.
To add fields to the blended data source, drag them from the Available Fields panel in the selected data source to an open slot under Fields to include in data source. To replace an existing field, drop the new field on top of the old one.
You can edit field names, aggregations, and date display types by clicking the field's data type icon (to the left of the field name).
Limit the number of records in the blended data source
To improve performance, as well as help you focus on the data that's most important to you, limit the size of the blended data by applying a filter or date range, or, for Google Analytics data sources, applying a segment. These options appear below the Fields to include in data source section of each data source in the blend.
Restricting the records in the leftmost data source controls the overall selection of records for the blended data source.
Rename the blended data source
Edit the Data source name field at the top right of the Blend Data panel.