Reference Lines and Trend Lines in Looker Studio | GlowMetrics

Dec 3rd 2021

Google Analytics

6 min read

Posted by Conor Ross

Reference Lines and Trend Lines in Looker Studio

Staying up to date with the latest features, additions and refinements to Google’s data visualisation platform, Looker Studio, can be a tough task. Rarely does a week go by without...

GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link

Staying up to date with the latest features, additions and refinements to Google’s data visualisation platform, Looker Studio, can be a tough task. Rarely does a week go by without a small change here and there, thankfully usually a notable improvement over what came before it, but you would be forgiven for missing the odd update. Some of the very best new features might not be immediately clear, so we’re here to help shed some light on the lesser-known features and updates that you may have missed.

The latest feature we’d like to highlight is the addition of built-in Reference Lines for certain widgets. These are a great tool when you want to add some extra detail to your line graphs and bar charts, such as a target, projection, or rolling average. Reference lines help you to both better understand your data to drive your decision-making, and to better present that data to other members of your team and stakeholders.

Plotting Averages and Percentiles as Reference Lines

Thankfully, adding reference lines is now a simple process, and we’ve finally moved past the roundabout methods of placing graph widgets on top of one another like a digital overhead projector (are we showing our age?) or trying to blend data sources to create a manual reference line. Let’s look at an example using a line graph that shows pageviews of the GlowMetrics Blog every week, over the course of twelve months. We’ll look at adding a few different lines here, starting with a rolling average.

Standard Line Graph in Data Studio

Example of a standard metric-based line graph.

Pageviews are moderately variable here, and we want to see a simple representation of the average number of Blog pageviews. We can create a dynamic line that will change as the data changes, should we look at a different date range, or apply a filter? Click on Add A Reference Line in the widget’s style menu, and select the Type as Metric. You can then select one of the metrics currently added to your widget, as well as the calculation upon which the line is based: Average, Median, Percentile, Min, Max, and Total. Select Average, which in this instance plots the Mean onto the graph. We can then label this graph as well as implement the usual display options.

Average Reference Line in Data Studio

Average or Mean plotted as a reference line. This line is dynamic and will change as the average changes.

We can add more than one Reference Line to a single chart. Click on Add A Reference Line once again, and a second set of options will appear. This time, we’re going to plot a line that helps to highlight the top-performing weeks. We can do this by using a line based on the 90th Percentile, meaning that 90% of our weekly data will sit below this line, and the top 10% above the line. Similarly, let’s add a line that shows us the lowest 10% as well, the 10th Percentile.

Percentile Reference Line in Data Studio

10th and 90th Percentiles are plotted as reference lines. These are also dynamic lines.

Adding these dynamic percentiles is really useful for highlighting instances of particularly high or low performance, helping you to identify potential areas for further analysis. Percentiles are also crucial when it comes to recognising outliers and anomalies.

Adding Constant Values

In addition to the dynamic lines above, we can also add constants to our widgets. These are ideal for plotting targets, or baselines. The process is much the same, however, when we select the Type of Reference Line, we’re going to click on Constant instead of Metric. This is the default option and means that we’re going to enter a value to plot on the graph, rather than a line being dynamically based on a calculation involving a specific metric.

Let’s look at our Blog pageviews example once again, and pretend we’ve set a target of getting 2,000 pageviews a week. We can present this on the graph by adding a line that has the Constant Value of 2000. This new line represents our weekly target, and we can easily analyse our true performance against this target.

Weekly Target Value in Data Studio

A constant value of 2,000 is a weekly target.

In addition to our weekly target, let’s say that we also have a target for these twelve months of 85,000. It wouldn’t make sense to show this value on our graph in its current form, as we’ve broken down the Pageviews every week, and a line showing a constant value of 85,000 is going to sit considerably higher than our data. In this instance, we can go to the Style menu for the widget, and under the options for our Line, tick the box for Show Cumulative. This will change the line from showing a weekly breakdown to showing a running total. We can then plot our target line alongside this new cumulative line, and quickly determine how we’re performing against that target; Have we hit our target? When did we hit it? Where was our highest period of growth? Etc.

Annual Target Value in Data Studio

A constant value of 85,000 for a cumulative metric.

The Different Types Of Trend Lines

It would be amiss of us to talk about Reference Lines without… ahem, referencing, the option to also include trend lines. These differ in how the line is calculated but are also very much a good option to have when creating graphs in Looker Studio. These have been available for a while now, and are a great way of showing the direction that certain metrics have been trending, and is another efficient way of increasing the value of your visualisations.

You’ll find this option above the Reference Line menu, in the Style menu of an appropriate widget. You have three options to choose from: Linear, Exponential, and Polynomial. If that sounds a bit too much like a mathematics class from years gone by, here’s a quick reminder:

Linear – The line of best fit i.e. the most accurate representation of the data when plotted as a straight line.

Polynomial – A curved trendline that shows directionality within your data. This is best suited to metrics with a high level of variability.

Exponential – Best suited to data that can be described as showing exponential growth or decline. Specifically, this is an exponential of the form eax+b. When it comes to data from Google Analytics or Google Ads, it’s unlikely you’ll need to use this, but can still be very useful when analysing other data sets.

Linear Trend Line in Data Studio

Example of a Linear Trend Line. A straight line at a constant gradient.

Polynomial Trend Line in Data Studio

Example of a Polynomial Trend Line. Note the changes in direction as the line curves with the data.

Optimising Your Data Visualisations

Reference Lines and Trend Lines are excellent ways of making small but valuable improvements to the presentation of data on graphs and charts within a Looker Studio dashboard. These may seem like simple additions, and they are, but remember that every optimisation that can be made is a chance to improve the effectiveness and efficiency of the information presented. This makes it easier for users to interpret and understand the data you’re visualising for them, which in turn helps to increase the value and utility of a dashboard.

It’s also important to remember that you should only add information that you deem to be relevant. The essence of effective data visualisation is presenting data clearly and concisely. Remember, we’re steering away from spreadsheet after spreadsheet of numerical data! Make sure that any lines, annotations, and details you add to a visual element of a dashboard have a purpose. In other words, don’t clutter your visualisations with unnecessary information and make them appear overcomplicated, as this can quickly remove the benefits of taking a more visual approach to data.

Want to Learn More About Looker Studio?

For more on Looker Studio, check out our Guide To Using Filters and Using Comparison Metrics. If you have any questions or there’s anything else we can help with on Looker Studio, please leave a comment below, or contact us at contact@glowmetrics.com.

You can also stay up-to-date by following GlowMetrics on Twitter or LinkedIn or by subscribing to our newsletter (link below) for the latest tips and news in the world of digital analytics and marketing.

Don’t forget to sign up for a complimentary account on our Resource Hub to access a wealth of valuable resources, including exclusive Looker Studio how-to videos and insights!


GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link

6 responses to “Reference Lines and Trend Lines in Looker Studio”

  1. Nayel says:

    Hello,

    I am on a project on datastudio and I wanted to know if it was possible on a graph to create an mail alert if a curve exceeds (for example) by 20% its trend line or its average.
    I think the polynomial trendline is the best one for my project buy I didn’t find how to do the soustraction between the curve and the trendline (with %) and create the alert.

    Thank you

    • Conor Ross says:

      Hi Nayel,

      Thanks for getting in touch. Unfortunately, I don’t think it’s possible to set up alerts based on a Data Studio dashboard yet, this would need to be done directly on the data source (alerts in Google Analytics for example – https://support.google.com/analytics/answer/1033021).

      The closest thing you’d be able to implement on Data Studio would be conditional formatting on a scorecard or table that shows the result of the percentage difference between the metric and its average. You can find the conditional formatting options in the setup menu on the right when you’ve selected a widget.

      Thanks,
      Conor

  2. Penny says:

    Hi Conor,

    Hope this message will still get to you. I’m pretty new to Looker Studio, and I believe this is the old Data Studio. I’m able to add trendlines to a chart but cannot seem to find the parameters for the trendline anywhere. For example, if I add a linear trendline, I would like to know the slope and intercept. I tried to hover over the trendline, nothing shows up. Any ideas on what else I can try?
    Thank you!
    Penny

    • Conor Ross says:

      Hi Penny,

      Thanks for getting in touch with us. This is a really good question – but unfortunately I think you’ve uncovered a real gap in the way Data Studio/Looker Studio adds these trendlines. You’re absolutely right, there’s no way to quickly see the information like slope and intercept behind trendlines in the same way you can with other graphs and reference lines.

      You can however download data within widgets (if you have the relevant permissions) by clicking on the options icon to the top right of a component when you hovering of it. One solution might be to download the the chart in question and export the data to a spreadsheet like Excel or Google Sheets, and then calculate the values there using the raw numbers. It’s a bit of a manual workaround admittedly, especially if it’s something you’d be looking to do on a regular basis and have easily recorded, but unfortunately I think this might be the easiest way at the minute.

      I’d also recommend checking out the Community Visualisations from the toolbar – you’ll find this between “Add A Chart” and “Add A Control” while in Edit mode. There are a lot of different charts available here that aren’t built into Looker Studio natively, and you can find more online that you can add via the “Build Your Own” option, so perhaps one of these might work as a potential solution.

      Apologies I’m not able to provide a more clear cut answer as to how you’d easily get those values. I think it’s a really good question and definitely a missed opportunity. Small quality of life updates to Looker Studio happen quite regularly, so if this is something that’s added in the future, I’ll be sure to let you know. I hope this helps with your question at least a little!

      If there’s anything else we can help with, or you have any other Data Studio / Looker Studio questions, please don’t hesitate to get in touch.

      Many thanks,
      Conor

  3. Ahmed says:

    Hello,

    I hope this Question gets seen. I have two series in my line/stacked bar graph. One is a Line format and the other is a Bar. I also have a straight reference/trendline which shows the capacity for each month (X is Month and Y is number of projects). I am trying to find the percent difference from the Line series down to the capacity reference line, however I do not see a option for it. I saw this article and hoped maybe you would be a good contact to ask!

    • Conor Ross says:

      Hi Ahmed,

      Thanks for getting in touch! Can I clarify if your line for Capacity is a field in your data source, or is this just set as a reference line in the Style menu? As far as I’m aware, you’re not able to calculate the percentage difference directly from a reference line unfortunately.

      The way I’d go about this is to create your Capacity value as a metric – you can do this by editing your data source and adding a new field. If this is a constant value, you can just enter the number. I’d then use this field to create a second new custom metric, which would essentially calculate your percentage difference, something like Number of Projects / Capacity. You can then use this metric in your graph or in other widgets.

      There have been recent updates to the reference line feature, so this may well be updated down the line to allow you to do this easily within the chart itself. I think it’d be a great feature to add, so fingers crossed!

      Hopefully this helps to bring out the data your looking for, without too much of a workaround. If you have any other questions, please don’t hesitate to get in touch.

      Thanks,
      Conor

Leave a Reply

Your email address will not be published. Required fields are marked *

GlowMetrics

Posted by
Conor Ross

Conor specialises in data visualisation, designing and creating bespoke data dashboards and automated reports with Looker Studio. With a background in Psychology and Research Methods, he also works on projects focused on improving customer experience and website usability through A/B Testing and Personalisation.
Read more from Conor Ross

Browse by Category



GlowMetrics
Optimise your website and marketing campaign performance with Ireland’s leading digital analytics agency
Sign up to our newsletter