12.6. Parameters on Charts
In this lesson, we will explore using parameters on charts in Looker Studio. Previously, we used parameters to display values on scorecards or for calculations. Now, let's dive into applying parameters to different chart types and getting creative with calculations.
- Understand how to use parameters on different chart types in Looker Studio.
- Learn how to create and customize chart reference lines with parameters.
- Discover how to incorporate parameters into calculations for charts.
- Explore creative ways to use parameters and calculations in Looker Studio for various use cases.
- Apply the concepts learned to real-world situations and projects.
Chart Reference Lines
Chart reference lines can be added to various chart types, such as time series or bar charts. They are helpful for indicating goals or targets that users might want to change each time they visit the report. This can be particularly useful for public-facing reports or lead magnets, where you want to assist users in visualizing their data in relation to their goals.
To create a reference line, go to the Style tab, find the Reference Line section, and click Add Reference Line. Initially, there won't be any reference lines, so you need to add one. Set the type of the reference line to Parameter and choose the parameter you would like to display (e.g., daily organic session target). Now, users can change the position of this reference line on the chart as needed.
Example: Daily organic session target as a reference line on a chart
Incorporating Parameters in Calculations
We can also incorporate parameters into calculations on charts, just like we did with scorecards. Let's consider an example with two lines on a chart: the blue line represents sessions directly from Google Analytics, and the green line represents adjusted sessions, which we calculate.
Example calculation: sessions × (1 + (percent increase ÷ 100))
In this case, the percent increase is 30, so the green line will be 30% higher than the blue line. You can adjust the percent increase to see the impact on the chart.
Example: Adjusting the green line by increasing the percent increase
Now, let's explore another example to see how creative we can get with parameters and calculations. Suppose we have a target number of sessions and want to calculate the average daily difference between the actual number of sessions and the target. This average daily difference should change based on the target value.
Example: Calculating average daily delta based on the target
The calculation involves:
- Counting the number of days in the timeframe.
- Multiplying the number of days by the target (as if the target is met every day).
- Subtracting the total number of sessions for the timeframe.
- Dividing the difference by the number of days in the date range.
This gives us the average daily delta from the target. Adjusting the target value will change the average daily delta accordingly.
As you go through these examples, think about how you might apply these concepts to your own reports, clients, or projects. The goal is to inspire you to find creative ways to use parameters and calculations in Looker Studio.