简体   繁体   中英

Using the same filter control for two different data sources

I have a Data Studio report containing two graphs.

Each graph is associated with a different data source. Each data source has one common field (ex: country) but shouldn't be joined together.

Currently I have to set one filter control for each data source and it is not friendly user. I want to use the same filter control (ex: country) to set the country in the 2 charts.

Is there a way to do so?

I have a not elegant solution for that:

Have you tried create a custom field on the 2 different data sources?

  1. go to Data Source "A" -> Add Field -> put the function CONCAT(Country_A, '') -> copy the field_ID
  2. go to Data Source "B" -> add field -> put the function (Country_B, '') -> PASTE & OVERWRITE the field_ID.

Use on of the custom fields you have created as control filter, it will filter data in both datasources (as field_ID matches on both sources)

More details:

Let say we have Data Source "A" & "B" and the field Country is the one that we want to make 'match' across those 2 data sources. What I do is basically create a new field on one data source by using the CONCAT(fieldName, '') function. You need to create the first custom field and then you need to "SAVE" or "COPY" the field ID. Then you go to the second data source, create a new Custom Field, following the same function CONTACT(fieldName, '') and OVERWRITE the Field_ID that Datastudio assigned by the one you have copied.

As a best practice, I always put the same Field Name on both custom fields.

Heads-up!

Be aware that if you have a list of 10 countries on data source A and a list of 20 countries on data source B, then depending on what custom field you choose to the control filter, you will have less or more options to filter. Also, this workaround does not "merge" values on both data sources. I would recommend to do a pre-processing with your data and add a data Source "C" which contains all possible countries and do the same workaround 3 times (1 custom field per data source).

Emmanuel Roulleau

its possible, filter controls work in reports with multiple data sources.

Filter control is a page-level component they effects all the charts on that page, if you want to use the same filter control to set the country in the 2 charts, Group them.

ctrl + select the charts and the filter control then Arrange -> Group

分组图表和过滤器控件

Check this embedded report https://datastudio.google.com/s/meLMNkz7ejY

So a filter control for the Analytics charts can use the Country dimension from either data source.

For more info Check This link https://support.google.com/datastudio/answer/9173975

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM