> For the complete documentation index, see [llms.txt](https://docs.datasuite.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasuite.vn/english/features/chart/edit-chart/conditional-formatting.md).

# Conditional Formatting

**Conditional Formatting** allows users to apply visual styles (like colors, icons, and fonts) to data elements based on their values. Its purpose is to help users quickly identify trends, highlights, warnings, or anomalies in Reports.

This feature is currently supported on the following components:

* **Data Table**: Format cell background, text color, or icons based on each cell’s value.
* **Scorecard**: Highlight KPI values with color or an icon depending on a set threshold.
* **Bar Chart / Column Chart**: Change bar color based on value (e.g., >100 is red, <50 is green).
* **Bar/Column with Line Combination Chart**: Allows separate formatting rules for each part (bar or line), supporting clearer hierarchical data representation.

#### How to Set Up Conditional Formatting

{% stepper %}
{% step %}

#### Open Chart or Table Settings

Click the chart or data table where you want to apply Conditional Formatting.
{% endstep %}

{% step %}

#### Go to the “Style” Tab

In the right-hand sidebar, open the **Visualizations** panel, then select the **Style** tab.
{% endstep %}

{% step %}

#### Add Conditional Formatting Rule

In the **Conditional Formatting** section, click the **Add** button to create a new rule.

<figure><img src="https://207765737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpRDG3vvgCOF596sbdkH0%2Fuploads%2FzgmJzJUoZGFadXtUZ2Nu%2Fimage.png?alt=media&amp;token=1a9a0794-160e-4b02-b24f-258d31e7963b" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Define the Condition(s)

Click **Add Rule** to set conditions.

* Conditions are combined using the **AND** operator (i.e., all conditions must be met for formatting to apply).
* Use the **Copy** icon to duplicate a rule and the **Delete** icon to remove it.

<figure><img src="https://207765737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpRDG3vvgCOF596sbdkH0%2Fuploads%2FH6MikNacndmySD3llfOa%2Fimage.png?alt=media&amp;token=6bd8bff7-9f96-4d9c-8d94-d770dd401ce8" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Select the Target Scope

Depending on the visualization type, choose the scope where the rule applies (e.g., specific column, dimension, or legend).
{% endstep %}

{% step %}

#### Choose the Format Style when Condition is Satisfied

Pick the desired format style (e.g., background color, text color) to apply when the condition is true. You can use predefined presets or customize your own.

<figure><img src="https://207765737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpRDG3vvgCOF596sbdkH0%2Fuploads%2FS7U1Yc4OcrCQTjnxLeKn%2Fimage.png?alt=media&amp;token=80e24331-6283-481d-8553-e00b9178dae0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://207765737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpRDG3vvgCOF596sbdkH0%2Fuploads%2FUYC9g0Lv3NifsZzXCcut%2Fimage.png?alt=media&amp;token=6d62c9e2-8471-40da-a24b-52470e5d79de" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Save Changes

Click **Save** to confirm the rule.\
Then **Save** the report to apply the formatting settings permanently.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}

#### **Notes:**

* You can apply **multiple rules**; the system will prioritize them **top-down**.
* Formatting capabilities may vary depending on the chart type.
* Avoid using too many formatting colors to maintain clarity and prevent visual overload.
  {% endhint %}
