Change the color of a bar chart based on a value using Google Data Studio Parameter

This one I took it from a Tableau Presentation, let’s say you want some element to have a particular color when they reach a value.

For example in this report, I want to make it clear which generators is producing more than 1000 MW.

Create a parameter MWREF

Data Studio formula engine you can not compare dimension to parameter, instead we create first a helper calculated field “diff”

then we create a second calculated field “color”

in the bar chart, I use “color” as as a breakdown Dimension

and here is the result

6 thoughts on “Change the color of a bar chart based on a value using Google Data Studio Parameter”

      1. I was hoping you managed this just using the new parameter function in data studio. I use data studio for work and currently don’t have access to big query. šŸ˜• Thanks for letting me know.

        Liked by 1 person

  1. I try with the metric is record count. The formula in the “diff” is “AUT Record Count”.

    The breakdown dimension shows error
    “Metric expressions and aggregations are not allowed in this expression.”

    Could you please give me some advice? I just would like to change the color if the bar shows the metric number of sum record count more than 10000, no parameter is needed.

    Like

Leave a Reply to mim Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: