Enabling Optional Dimensions in Google Data Studio

Enabling Optional Dimensions in Google Data Studio

There are many ways to make your Data Studio reports more interactive and dynamic. Using optional metrics, you can allow report viewers to change which metrics are shown in a chart. But have you ever wished you could do the same with dimensions?

While there is no native feature in Data Studio to enable “optional dimensions” in a chart, you can use parameters and calculated fields to achieve a similar result.

In this post, we will walk you through how to create a parameter control that allows viewers to change the dimension for any given chart on the fly.

1. Create a parameter

  1. Add a new parameter to your data source.
  2. Enter a parameter name and select “Text” as the data type.
  3. Configure the permitted values as a “List of values.” Add a value for each optional dimension that you wish to include.
  4. Select your desired default value.

2. Convert the parameter into a dimension

Add a new field that returns your optional dimension parameter:

3. Create a calculated field to return the list of dimensions

Create a calculated field that uses a CASE statement to return the respective dimension for each value of the parameter:

4. Create a chart with the calculated field

Add the calculated field from the previous step as a dimension into your chart:

5. Create a drop-down list control

Add a drop-down list control and select your parameter as the control field. This will allow report viewers to select which dimension displays in your chart.

Check out our example report in Data Studio, where you can use the drop down control to choose from the list of optional dimensions!

View in Data Studio

By |2021-02-11T17:17:44-05:00February 11th, 2021|2 Comments
Categories: Data Studio

2 Comments

  1. Megan Landau 2021-08-19 at 02:31 - Reply

    Hello! Thanks so much for the instructions. When I set up my dropdown, the only option is the field I’ve selected as the parameter’s Default Value in step 1.
    When I change the Default Value, the option in the dropdown changes too.
    How can I get all options to show up?

    • Hayley Yacynuk 2021-08-20 at 13:56 - Reply

      Hi Megan, thank you for your question!

      When setting up the drop-down list, make sure you are using the parameter you created in step 1 for the control field rather than the dimension you created in step 2. By using the parameter, you are providing the control field with all the values you outlined in the parameter setup. If you use the dimension instead, only the default value will be visible to the control field which I believe is the reason you are only seeing that default option. To reference the names used in the blog post example, the parameter “Choose a Dimension” is what you want to use as the control field, not the dimension “Optional Dimension Value”.

      Let us know if this works for you!

Leave A Comment