Cover Image

Conditional Formatting in DataStudio

Hey! Got a quick question for you

How come anything of value is identified? Through comparison, of course. Whether it be your school grades, to high quality metals, a precise value for anything is identified through comparison by its similar counterparts.

Samsung v/s Iphone

In Google Datastudio also, this comparison is of utmost importance as it shows the difference in the same value, between different sets of data. This can be shown through conditional formatting of data as it shows the difference in the same value, between different sets of data. However, conditional formatting as a tool hasn’t been made available until very recently.

It is now possible to style your charts in data studio based on certain conditions. For example, if Campaign is “Sales” then set the entire table row font color to green, or if Sales is less than Forecast, set the scorecard background color to red.

In a short description, these are a few steps, which followed, will enable conditional formatting:

  1. Click on :Edit > report.
  2. Select a supported chart (supported chart formats discussed later)
  3. On the right, click STYLE.
  4. At the top, in the Conditional formatting section, click + Add.
  5. Define the format rules.
  6. Define the color and style to apply when the format rules are met.
  7. Click Save.

Conditional formatting evaluates one or more formatting rules and applies color and style to the fields in your chart that satisfy those rules. Currently, these can be applied in rules in tables and scorecards.

If a charts visualizations are enabled to a different type (for example, a table to a scorecard), conditional formatting will continue to work as long as the fields and values used in the formatting rules still exist in the new chart. Rules based on fields or values that aren’t in the new visualization are ignored.

There are, however, a few important conditions to keep in mind.

The order in which you specify format rules can be important. Multiple rules in a chart are evaluated in a descending order, and the last set of true conditions found is the one that is applied. For example, say you’ve got three rules in a table:

  • Rule 1 sets both the font color and background color.
  • Rule 2 sets the font color.
  • Rule 3 sets the background color.

When all 3 rules are true, you’ll get the font color from rule 2 and the background color from rule 3. Rule 1 is ignored, as shown below:

You can reorder rules using the drag bars on the left. Here’s what happens when we move rule 3 to the top:

In this example, the rule 1 background color goes through the following rules and is applied to the table.

This is how to use the conditional formatting tool in google data studio, which will enable even better understanding through visualization of data.

Need Help with Digital Analytics? Get in touch