Chapter 12: Parameters in Looker Studio
12.4. Parameters: From Creation to Visualization
In this lesson, we'll go through an example of using a numeric parameter in Looker Studio. We'll cover creating a parameter in the data source, getting user input, and utilizing the input for calculations and visualization.
Learning Objectives
By the end of this lesson, students should be able to:
- Create a parameter in the data source with a specific data type and range.
- Use controls to get user input for the parameter.
- Utilize the input in calculations and visualizations in Looker Studio.
- Create custom fields for calculations and visualizations.
- Understand the significance of different background colors in Looker Studio.
Creating a Parameter
First, let's establish a few things for this lesson:
- White background with black text represents live data from a data source, like Google Analytics.
- Purple background indicates a parameter or anything related to it.
- Yellow or other backgrounds indicate calculations based on the input parameters.
To create a parameter in the data source, follow these steps:
- Head to your data source and select it.
- Click "Add a parameter."
- Enter the name, ID, data type, and range for the parameter.
- Save the parameter.
Note: In Looker Studio, dimensions are green, metrics are blue, and parameters are purple.
Getting User Input
To get user input for the parameter, use a control:
- Look for a number input box in the controls section.
- Place the input box on your page.
- Change the size and color to indicate that this is a parameter input.
- Link the parameter to the input box by searching for it and dragging it to the control.
Now you have an input box connected to the parameter, with a default value set.
Using Input in Calculations and Visualization
To use the input in calculations, create a custom field for the parameter and define the calculation formula. For example, if you want to calculate a percentage change based on the user input, you can create a custom field called "Percentage Change" and use the formula:
Percentage Change / 100
Now you can use this custom field in your calculations, such as revenue projections for the next quarter:
Revenue * (1 + (Percentage Change / 100))
You can also display the parameter value directly on a scorecard by creating a custom field and setting the data type to a percentage.
That's it! You've successfully created a parameter, gathered user input, and used the input for calculations and visualization in Looker Studio. This can be a powerful tool for business owners or marketers to make projections based on historical data and user input.
📩 Receive my weekly Looker Studio tips
🖇 Connect with me on LinkedIn