Hey there, I’m Benjamin from Loves Data.
In this video, you will learn how to add targets in Google Data Studio.
Adding targets to your reports and dashboards will let you quickly see if you’re hitting
your KPIs.
To do this we will be adding reference lines to our charts and we will also look at how
to add a target and ranges to bullet charts.
Let’s head to Google Data Studio and get started!
Google has recently added the ability for us to add reference lines to our charts in
Google Data Studio.
This lets us add a constant, or static, value as a line to our charts, or we can use a calculated
metric for the line.
Let’s start by creating a new report...
I’m going to add the Google Analytics sample data to the report...
Now let’s add a time series to our report...
And let’s change the metric to ‘Ecommerce Conversion Rate’...
You can use any metric you like for your chart.
So if you’re not looking after an ecommerce website, then you might want to choose ‘Goal
Conversion Rate’, an engagement metric like ‘Bounce Rate’, or any other metric that’s
important to you.
Now let’s select ‘Style’...
And let’s click ‘Add a reference line’...
We can choose from ‘Constant’ which is a single static value, or ‘Calculated’.
I’m going to use ‘Constant’, but if you wanted your line to be based on the metric
used in the chart, then you can select ‘Calculated’.
For example, you can use this option to show the average value of the metric in your chart.
For this chart, I want to show a target of 0.25% for the conversion rate, so I’m going
to enter ‘0.0025’ as the value for the reference line.
And I’m going to name the reference line ‘Target Conversion Rate’...
And I’m going to change the color...
We can now clearly see the ecommerce conversion rate trend for each day, along with our target
for the metric.
Remember, I’m using the ecommerce conversion rate metric from the sample Google Analytics
data, but you can use any metric you link for your chart.
And apart from time series charts, you can also add reference lines to line charts, combo
charts, bar charts, column charts, area charts, and scatter charts.
Now let’s look at another way we can display a target.
Let’s add a bullet chart to our report...
I’m going to change the metric to ‘Revenue’...
And we can then set the values for the range limits.
Let’s enter ‘3000’ for range limit one, then ‘6000’ and ‘7000’.
We can see this adjusts the grey bars behind the blue bar, which represents our revenue
metric.
Now we can enable the option to show a target line on the bullet chart...
And let’s set 6000 as the value...
The chart now includes a vertical line for our target of six thousand dollars in revenue.
Since the bullet chart doesn’t display the value of the metric, let’s add a scorecard
to our report...
And now we’re going to use conditional formatting to change the color of our scorecard when
our metric is below our target.
To do this, let’s select ‘Style’...
And let’s click ‘Add’ under ‘Conditional Formatting’...
We can set the condition to ‘Less Than’...
And enter ‘6000’ as the value...
Now we can set the color for the text and the background...
This now means that if the revenue value is less than six thousand dollars, the scorecard
will be highlighted in red.
Let’s click ‘Save’...
And we can see our scorecard is red.
Now I want to show you how to display a metric, along with your target value, and the difference
between the metric and your target.
To do this we’re going to add a table to our report...
And I’m going to remove the dimension, so that the table displays a single row...
To add our target, I’m going to click ‘Add Metric’...
And I’m going to select ‘Create Field’...
I’m going to name the field ‘Target Revenue’...
Now I’m going to enter ‘6000’ as the formula...
I’m going to select ‘Type’ and change this to our currency so that the metric is
displayed as dollars...
And now I can click ‘Apply’...
Now I want to add the difference between the metric and our target.
To do this I’m going to click ‘Add Metric’...
And again select ‘Create Field’...
This time I’m going to name the field ‘Difference’...
And I’m going to enter ‘Revenue’, ‘Minus’, ‘6000’ as the formula...
And I’m going to change the ‘Type’ to our currency...
And I’m going to click ‘Apply’...
We can now see that we haven’t met the target for our revenue metric, because ‘Difference’
is shown as a negative dollar value.
Finally, I’m going to add a conditional formatting rule to change the color of our
‘Difference’ if we haven’t met our target.
To do this, I’m going to select ‘Style’...
And I’m going to select ‘Difference’ as the metric...
Then I’m going to select ‘Less Than or Equal To’ as the condition...
And enter ‘0’ as the value...
Now I’m going to again select ‘Difference’ under ‘Color and Style’...
And select red for the text and background color...
Now I can click ‘Save’...
We can see that ‘Difference’ is highlighted in red since the value is below zero.
When we meet our target for the metric, it will stop being highlighted in red.
You could go a step further and change the color to green using another conditional formatting
rule.
So that’s how you can set targets in Google Data Studio.
Remember you can add reference lines to your charts, including time series, line, bar charts,
and more.
Plus you also have the option of setting targets for the bullet charts used in your report.
What targets and KPIs are you going to add to your reports in Google Data Studio?
I’d love to know!
Let me know in the comments below, and if you found this video helpful, please subscribe,
share it with your friends, and hit the like button so I know to make more videos like
this.
See you next time!