You can set the font and background colors used in your charts based on the data. For example, if Campaign is "Summer Sale," then set the entire table row font color to green, or if Clicks is less than 100, set the scorecard background color to red.
Single color conditional formatting
Single color conditional formatting applies a specific font color and background color to your data. Single color conditions can include:
- Dimensions
- Metrics
- Multiple conditions using AND/OR logic.
Use single color formatting on a table
- Edit your report.
- Select a table.
- On the right, click STYLE.
- At the top, in the Conditional formatting section, click + Add.
- Under Color type, select Single color.
- Under Format rules, select a comparison option:
- Dimension - compare to a dimension value.
- Metric - compare to a metric value.
- Select any field - compare to any value in the chart (see below).
- Define a comparison condition.
- For example, Contains, Equal to, Empty.
- Enter an input value.
- For metrics, you compare to a literal value or another metric in the chart.
- For example, "Summer Sale" or Forecasted Sales.
- Define the colors to apply when the format rules are met.
- Click Save.
Use single color formatting on a pivot table
Pivot tables only support single color formatting.
- Edit your report.
- Select a pivot table.
- On the right, click STYLE.
- At the top, in the Conditional formatting section, click + Add.
- Under Format rules, select a comparison option:
- Row - compare to a row dimension value.
- Column - compare to a column dimension value.
- Metric - compare to a metric value.
- Select any field - compare to any value in the chart (see below).
- Define a comparison condition.
- For example, Contains, Equal to, Empty, or Greater than.
- Enter an input value.
- For metrics, you compare to a literal value or another metric in the chart.
- Define the colors to apply when the format rules are met.
- Click Save.
Use single color formatting on a scorecard
- Edit your report.
- Select a scorecard.
- On the right, click STYLE.
- At the top, in the Conditional formatting section, click + Add.
- Under Color type, select Single color.
- Under Format rules, the Values option is selected and can't be changed. This option automatically uses the current scorecard metric as the basis of the formatting rule.
- Define a comparison condition.
- For example, Equal to, Is True, or Greater than.
- Enter an input value.
- Define the colors to apply when the format rules are met.
- Click Save.
Select any field
The "Select any field' option lets you define a single color format rule based on any field in the chart.
- Select any field.
Color scale conditional formatting
Color scale conditions let you evaluate a single metric against its percentage or absolute numeric value.
Use color scale formatting on a table or pivot table
- Edit your report.
- Select a table or pivot table.
- On the right, click STYLE.
- At the top, in the Conditional formatting section, click + Add.
- Under Color type, select Color scale.
- Under Format based on, select a field in the chart. You can only select a single metric as the basis for a color scale.
- Select the part of the chart to format.
- For tables, you can format individual fields, or the entire row.
- For pivot tables, you can only format one of the metrics in the chart.
- Define the colors to apply when the format rules are met.
- Click Save.
Use color scale formatting on a scorecard
- Edit your report.
- Select a scorecard.
- On the right, click STYLE.
- At the top, in the Conditional formatting section, click + Add.
- Under Color type, select Color scale.
- Under Format rules, the Values option is selected and can't be changed. This option automatically uses the current scorecard metric as the basis of the formatting rule.
- Define the colors to apply when the format rules are met.
- Click Save.
Compound format rules
Conditional formatting rules can include multiple conditions using OR or AND logic.
For example:
Source equal to "(direct)" OR Sessions greater than 2000 will format rows that match either condition.
Source equal to "(direct)" AND Sessions greater than 2000 will format rows that match both conditions.
You can have up to 5 AND clauses. Each clause can have up to 5 OR conditions.
Format rule order
The order in which you specify format rules can be important. Multiple rules in a chart are evaluated in 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 will be 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 background color from rule 1 carries through the following rules and is applied to the table.
What you can format
You can apply conditional formatting to the following portions of your charts:
Format the entire row
The Entire row option applies the colors you select to every row in the table that matches the condition.
Format a specific field
To format a specific field in a table, select that field from the menu.
For scorecards, or tables using Select any field, this option appears as Cells, and is the only option available.
Drill down dimensions and optional metrics
You can apply formatting rules to drill down dimensions and optional metrics. However, the rules only take effect when those fields are visible in the chart or table.
How to select colors
As noted at the beginning of this article, you can use single colors or a color scale to format your charts.
Single colors
Use the color pickers to select the font color and background color to the target values for each condition. You'll see an example appear on the right.
Color scale
Data points determine the minimum, middle, and maximum values of your color scale. By default, a new color scale defines 3 data points based on percentages, with preset colors (red, yellow, green). You can base the scale on absolute numbers, and select different colors for each data point.
You can have a maximum of 5 data points and a minimum of 2 data points.
- To add more data points, hover over an existing data point and click Add .
- To remove a data point, hover over it and click Delete .
Use preset colors based on your current theme.
Reverse the color scale
To swap the order of the minimum and maximum colors, click Reverse color scale .
Format rules, percentages, and decimal precision
Bounce rate > .512
Edit and delete conditional formatting rules
- Edit your report.
- Select the chart with the rule you want to edit.
- On the right, Click STYLE.
- At the top, in the Conditional formatting section, click Edit , then for the rule you want to change, click Edit or Delete .
Copy conditional formatting rules
There are 2 ways to duplicate conditional formatting rules:
- Copy and paste a chart with conditional formatting to create a new chart with those same rules.
- Copy a chart with conditional formatting, then use Edit > Paste special > Paste style only to apply that chart's conditional formatting to an existing chart.
Limits of conditional formatting
- Single color conditional formatting is currently available for tables, pivot tables, and scorecards.
- Color scale conditional formatting is currently available for tables and scorecards.
- Conditional formatting on pivot tables that use Expand-Collapse only works if the rule is based on "Any value."
- Dimension-based compound conditions in pivot tables must use the same field in each OR condition.
- Format rules can only use fields currently contained in the chart.
- You can have up to 20 format rules per chart.
- Switching between chart visualization types (for example, switching a table to a scorecard, or a pivot table to a table) may require you to update conditional formatting rules, depending on the type of chart and the fields used in the rule.