> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/documentation/readme/planning-sheets/how-tos/conditional-formatting/create-rules-in-conditional-formatting/page-1.md).

# Page 1

### Format by Rules (If conditions)

In the **Format by** dropdown, select **Rules (If conditions)** to configure rule-based conditional formatting based on one or more logical conditions. Format cells using font styles, colors, borders, icons, or background highlights when specified conditions are met.

#### Configure formatting styles

In the **Style** section, define how data should appear when conditions are met:

* **Font style** – Apply bold, italic, or underline
* **Font color** – Change text color
* **Cell background** – Highlight cells with color
* **Borders** – Add custom borders
* **Icons or text** – Display indicators or symbols
* **Hide values** – Mask sensitive data when conditions are met

You can also:

* Align icons within cells
* Display only icons or text (hide values)
* Apply formatting to charts or labels where applicable.

<figure><img src="/files/DzQniPJpkohYtDyHtChO" alt=""><figcaption></figcaption></figure>

#### Define rule conditions

Use the **Conditions** section to specify when formatting is applied. You can combine multiple conditions using **AND/OR** logic.

Each condition contains the following components:

| Setting          | Description                                                                                       |
| ---------------- | ------------------------------------------------------------------------------------------------- |
| Measure or field | Select the measure or column to evaluate.                                                         |
| Operator         | Define the comparison logic, such as *Greater than*, *Less than*, or *Equal to*.                  |
| Condition type   | Specify the comparison source, such as **Number**, **Data selection**, **Value**, or **Formula**. |
| Value            | Enter the comparison value or select a reference.                                                 |

Supported condition types include:

* **Number** - Apply formatting based on numeric thresholds.
* **Data selection** - Reference another cell value dynamically.
* **Value -** Compare against another measure or column.
* **Formula** - Use expressions combining measures and values.
* **User selection** - Apply formatting dynamically based on runtime user interaction.

#### Nested conditions

Advanced conditional formatting can be done by selecting **Add Condition.**

* Add multiple conditions and combine them using **AND/OR** logic
* Apply complex business rules across dimensions

<figure><img src="/files/NzUEJPsp6r1xcCNNLAwl" alt=""><figcaption></figcaption></figure>

### Format by - Color scale conditional formatting

**Color scale** applies gradient-based conditional formatting to values in a planning sheet. Color scales help visualize data distribution and identify high and low values using color intensity.

The **Color scale for** lets you select the formatting target.

Available options include:

* **Background** – Applies gradient formatting to the cell background.
* **Font** – Applies gradient formatting to the text color.
* **Data Bars** – Displays bars inside cells to represent value magnitude.
* **Bubble Chart** – Applies color scaling to bubble chart visuals.
* **Action Dots** – Applies color-based indicators using action dots.
* **Action Color** - Applies color-based formatting to action or status indicators.

<figure><img src="/files/7xwZSvif5ElWFbzQ2nkj" alt=""><figcaption></figcaption></figure>

Use **Custom color ranges** to define color ranges based on **values** or **percentages**. You can add or remove ranges as needed.

Enabling **Hide Values** hides the values of the cells.

The **Middle percentage** setting defines the midpoint used in a gradient scale.

<figure><img src="/files/wDBbquCfKgOmHxzo7bvX" alt=""><figcaption></figcaption></figure>

Use **Heat map type** to control how color scale formatting is evaluated across the planning sheet.

Available options include:

* **Row wise** – Applies color scaling independently for each row based on the values within that row.
* **Column wise** – Applies color scaling independently for each column based on the values within that column.
* **Table wise** – Applies color scaling across the entire table using all visible values.

Select the appropriate heat map type based on how you want values to be compared and visualized.

<figure><img src="/files/3OMQ5dPHE6O5ecxoGVVK" alt=""><figcaption></figcaption></figure>

Use **Color scale type** to select the color distribution pattern used for conditional formatting.

Available options include:

* **Sequential** – Uses a gradual progression of colors to represent low-to-high values. This type is useful for displaying continuous numeric ranges.
* **Diverging** – Uses contrasting colors to highlight variation above and below a midpoint or baseline value. This type is useful for variance and performance analysis.
* **Diverging - color safe** – Uses accessibility-friendly diverging colors designed for improved readability and color differentiation.
* **Qualitative** – Uses distinct colors to represent categorical or non-sequential data values.
* **Qualitative - color safe** – Uses accessibility-friendly qualitative colors for categorical data visualization.
* **Continuous - Range** – Applies a continuous gradient across a defined value range.
* **Continuous - Diverging Range** – Applies diverging colors across a defined range with emphasis on midpoint variation.
* **Continuous** – Applies a smooth color transition between minimum and maximum values.
* **Continuous - Diverging** – Uses contrasting colors to highlight values above and below a midpoint or baseline value.
* **Custom** – Lets you define custom color ranges and thresholds for conditional formatting.

<figure><img src="/files/bzY93MDZXQjDQDgbdclH" alt=""><figcaption></figcaption></figure>

Use the **Color scheme** section to customize the appearance of the color scale conditional formatting.

You can configure the following settings:

| Setting         | Description                                                                                 |
| --------------- | ------------------------------------------------------------------------------------------- |
| Color scheme    | Select the color palette used for the color scale.                                          |
| Reverse color   | Reverses the selected color sequence.                                                       |
| Number of bands | Defines the number of color intervals used in the scale.                                    |
| Hide value      | Hides cell values and displays only the color formatting.                                   |
| Auto font color | Automatically adjusts the font color for improved readability against the background color. |
| Include null    | Includes null or blank values in the color scale evaluation.                                |

<figure><img src="/files/zU5eTPVVklFprJWVODKg" alt=""><figcaption></figcaption></figure>

The **Middle percentage** setting defines the midpoint used in a gradient scale.

<figure><img src="/files/zMBLUCJJsvGUTOhps03o" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/UvazcJxxof15FA9aXSl0" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/documentation/readme/planning-sheets/how-tos/conditional-formatting/create-rules-in-conditional-formatting/page-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
