Percentage change day by day in Google DataStudio

Viewed 5867

I would like to generate an easy daily percentage change of var in Google Data Studio day-by-day as done below:

enter image description here

Basically, as shown in C4, -65.31% indicates that from day 2 to day 3 there was a decrement of 65.31% of var value and so on.

1 Answers

Created an Editable Google Data Studio Report to demonstrate the process below:

1) dayPLUS1 (Calculated Field: Data Source-level)
Create a metric that adds 1 to the Day field:

day + 1

For YYYYMMDD Date field calculations, use the formula below:

CAST(Date AS NUMBER )+1

2) Reaggregation (Self Blend)
Perform a self blend where the left Data Source includes values for the Day field and the respective metric, whilst the Data Source on the right includes the Day Plus 1 values:
Data Source 1

  • Join Key: day
  • Metric: var
    Data Source 2
  • Join Key: dayPLUS1
  • Metric: varPLUS1 (rename the var metric)

3) Table (Blended Data Source)
Create a Table with the field to display the Daily Percentage Difference:

  • Dimension: day
  • Sort: day in Ascending order
  • Metric 1: var
  • Metric 2 (Calculated Field; Type: Number > Percent):
(SUM(var) / SUM(varPLUS1)) - 1
Related