Using Google Data Studio Parameters to Dynamically Highlight your Data

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.

The diagram from the last post comparing users to new users.

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.

Creating a range type parameter with a default, min and max value.

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 users_threshold field.

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.

A simple CASE WHEN statement with two distinct values.

Finally, we’ll add this last field as a breakdown dimension to our stacked bar diagram and customize the colors as we see fit.

Setting up a bar chart with a breakdown dimension for highlighting.
The final product. The user is free to insert any value between 100 and 500, dynamically changing the colors.

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!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren.Erfahren Sie, wie Ihre Kommentardaten verarbeitet werden