In our last article about Google Data Studio, we introduced the usage of parameters and presented a use case in which we could differentiate between new and engaged users at will, dynamically setting a different dimension or metric for our dashboard, and giving our users more control over what KPIs are truly important to them, and how they want to compare different metrics to each other.
Now, let’s shift our focus to dashboard design, and helping our users more easily find the information they are looking for.
Though it was already possible to highlight information in dashboards before the introduction of parameters, they are once again providing the users with more control. They enable the users to set their own values and highlight the graphs accordingly.
Let’s go back to the same dataset we used in the last example, but let’s focus only on the number of users this time. We’re displaying our weekly user data in columns and would like to highlight the columns when the number of users passes a certain threshold.
For this, we’ll start by creating a parameter
users_threshold. It’s a
NUMBER data type with a value that can be set by the user, down to a minimum of 100 and a maximum of 500. Without anything set, the value should default to 200.
As Data Studio can’t compare a dimension to a parameter, we’ll first create a custom field called
difference_users_threshold, where we’re simply subtracting our users field from our
If we opt to simply highlight the values without using parameters, we would substitute the parameter in this calculated field by whichever fixed threshold we choose to highlight.
We need yet another field, which we will use to set the highlight color in the dashboard, we’ll call it
users_threshold_color and use a simple
CASE WHEN statement to set some values to 0 and some to 1, although we can be free to use whichever wording we like.
Finally, we’ll add this last field as a breakdown dimension to our stacked bar diagram and customize the colors as we see fit.
Having set everything up and with a range selector added to the dashboard, the users can now dynamically choose the threshold as they see fit, making it easier to spot patterns and outliers. Though we kept this simple, it would also be possible to add multiple selectors and set different thresholds for each diagram or metric.
If this article gave you some ideas and you’re not sure how to put them to practice, don’t hesitate to contact us, we’d love to help!