user3701187
user3701187

Reputation: 33

Google Data Studio: Different fixed, dynamically-generated date ranges for each metric column in a table

I have a Google Data Studio table where the data range for the entire table is set using a control. It looks like this:

Page Unique Views (after 7 days) Unique Views (after 30 days) Unique Views (after 90 days)
/page1.html 9 9 9
/page2.html 7 7 7
/page3.html 7 7 7

But I'm trying to set a different date range for each Unique Pageviews column, so the data would look like this:

Page Unique Views (after 7 days) Unique Views (after 30 days) Unique Views (after 90 days)
/page1.html 9 32 101
/page2.html 7 14 76
/page3.html 7 21 37

I see how to set the date range at the report/control/table level (docs), but I haven't found a way to set the date range at the table column level.

Am I missing something or is this simply a limitation of Data Studio?

Upvotes: 2

Views: 1297

Answers (1)

Nimantha
Nimantha

Reputation: 6471

One approach is to perform a blend with three tables (all from the same data source, in this scenario the sample Google Analytics data source), but each with a different custom date range, one for each date range required (7 days, 30 days and 90 days); each date range will be dynamic, shifting automatically, daily:

1) Blend

Table 1 Table 2 Table 3
Dimension: Page Dimension: Page Dimension: Page
Metric: Unique Views
Rename with suffix (after 90 days)
calc_field_90_days
Metric: Unique Views
Rename with suffix (after 30 days)
calc_field_30_days
Metric: Unique Views
Rename with suffix (after 7 days)
calc_field_7_days
Date Range: Custom (Advanced - Last 90 Days)
daterange_90days
Date Range: Custom (Last 30 Days)
daterange_30days
Date Range: Custom (Last 7 Days)
daterange_7days
blend_table_1 blend_table_2 blend_table_2

2) Join Configuration

Join Description Table 1 🔗 Table 2 Table 1 🔗 Table 3
Join Operator Left Outer Left Outer
Join Condition Page (Table 1) 🔗 Page (Table 2) Page (Table 1) 🔗 Page (Table 3)
Image table1_table2 table1_table2

To summarise, the blend will be:

blend_summary

3) Table (Chart)

  • Data Source: Blend
  • Dimension: Page
  • Metric 1: Unique Views (after 7 days)
  • Metric 2: Unique Views (after 30 days)
  • Metric 3: Unique Views (after 90 days)

Publicly editable Google Data Studio report (sample Google Analytics data source) and a GIF to elaborate:

gif

Upvotes: 1

Related Questions