---
schema_version: "1"
id: 8510870741994c40433454056b4da5389faea9d74b3f99b1ef977ee801e96f10
title: Automatically Highlight Data with Conditional Formatting
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_chart_conditional_formatting.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_chart_conditional_formatting.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d80a58b8301ba216775d2af5e9da901ccb46215d6b0a3a0a14e376d287cff69c
description: Don’t delay important decisions because you miss critical changes in your data. With clicks, not code, add rules to automatically format results to quickly catch changes and take immediate action. For example, highlight accounts in red in a bar chart when their CSAT score drops below 80% so that you can get on the phone with those customers.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Automatically Highlight Data with Conditional Formatting

Don’t delay important decisions because you miss critical changes in your data. With clicks, not code, add rules to automatically format results to quickly catch changes and take immediate action. For example, highlight accounts in red in a bar chart when their CSAT score drops below 80% so that you can get on the phone with those customers.

Use rules to automatically highlight charts and tables in a lens or dashboard as well as number widgets in your dashboard. Stay on top of each KPI by highlighting the highs and lows based on ranges and colors that you specify. Or, distinguish each measure or dimension value (group) by color-coding them.

For example, you can apply conditional formatting to accomplish the following goals.

- Determine how well you’re doing on a KPI by coloring the number widget based on its value.
    
    ![The number widget has a green background based on its value and the conditional formatting.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_number_widget.png)
- Distinguish each measure in a chart with a unique color.
    
    ![The chart shows a differnet color for each measure based on conditional formatting settings.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_measures.png)
- Similarly, distinguish each dimension value.
    
    ![The horizontal bar chart shows the selected color for each dimension value.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_dimensionValues.png)
- Determine your top and bottom performers by categorizing numeric values into colored bins. You can add up to 10 bins.
    
    ![The chart shows a differnet color for each bine defined for the Avg of Discount measure.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_measureValues.png)
- Focus on key table records by color-coding the text or background of a column’s cells. In the following example, the Customer Name column is colored based on the value of the Sales field.
    
    ![The Customer Name field is color coded based on the value of the Sales field, where green is more than 1,000, yellow is more than 200, and below that is red.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_tableColumn_basedOnOtherColumn.png)

Set up conditional formatting in the widget properties panel. Although you set it up at the widget level, the formatting applies to the underlying query. Conditional formatting affects all widgets that use the query. If you change the widget or chart type, the formatting is retained. A message appears if the formatting can’t be retained, like when changing between a table and chart widget. Conditional formatting overrides colors set on dimension values in the dataset XMD.

For charts and number widgets, set up conditional formatting in the widget properties. Select **Measures** to apply a format to each measure. Or select one measure or dimension to apply a format to each of its values.

![For charts and number widgets, you can apply conditional formatting on measures or a measure's or dimension's values.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_imageOrChartOptions.png)

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

Note Each chart or number widget can have one conditional formatting rule.

For tables, in the Column tab of the widget properties, select the column that you want to format and then set the rule used to format it. Each table can have multiple conditional formatting rules. You can apply only one rule for each style, like background color or text color in a table.

![The Conditional Formatting section for this table shows that three bins are defined based on the Sales field with thresholds at 200 and 1,000.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_condFormat_tables_config.png)

For calculated dimensions, select the dimension and click Pick Values. For Select Values, you can choose previously defined values or enter custom values.

![Conditional formatting pick values](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_explorer_cf_pick_values2.png)

If you enter a custom value, then click to add it to the Select Values list.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col> <col> <col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="text-align:left;vertical-align:top;"><span style="vertical-align:text-bottom;display:inline-block;"><img style="width:250px;margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_explorer_cf_default_values.png" alt="The Pick Values list showing the defaults"></span></td><td class="slds-cell-wrap" style="text-align:right;vertical-align:top;"><span style="vertical-align:text-bottom;display:inline-block;"><img style="width:250px;margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_explorer_cf_add_string.png" alt="Adding a string for conditional formatting"></span></td><td class="slds-cell-wrap" style="vertical-align:top;"><span style="vertical-align:text-bottom;display:inline-block;"><img style="width:250px;margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_explorer_cf_string_added.png" alt="Select Values for conditional formatting with custom string added to the list"></span></td></tr></tbody></table>

- **[Conditional Formatting Considerations](https://help.salesforce.com/s/articleView?id=analytics.bi_chart_conditional_formatting_considerations.htm&release=264.0.0&type=5)**  
    Keep these considerations in mind when setting up conditional formatting.
- **[Set Up Complex Conditional Formatting](https://help.salesforce.com/s/articleView?id=analytics.bi_dashboards_condformat_complex.htm&release=264.0.0&type=5)**  
    You can set up conditions based on a single reference column in the widget properties. However, sometimes, you have to create more complex conditions. To set up rules based on multiple reference columns for number and table widgets, use SAQL.

#### See Also

- [Column Properties](https://help.salesforce.com/s/articleView?id=analytics.bi_explorer_column_properties.htm&release=264.0.0&type=5 "The Column Properties panel lets you jazz up the columns you want in compare, values, and pivot tables. To highlight data that meets specific criteria, set conditional formatting rules on a column. Or, highlight data based on conditions set on a reference column. To make a column stand out without applying any conditions, you can use text alignment and text styles. In addition to displaying data in the text format, you can set a measure column’s data type as a bar.")