# Configuring rules

You can create conditional formatting rules based on if conditions. To create a rule, select the ***New rule*** option from the menu. The Conditional Formatting side pane opens on selecting this option.&#x20;

### Creating comparisons

You can create custom comparisons using the dropdowns in the **If** section.

<figure><img src="/files/CXigtEeaBTJhOBnyiQXi" alt=""><figcaption><p>Creating CF rules</p></figcaption></figure>

**i)** The first dropdown lists all the measures and dimensions in the visual.

**ii)** The second dropdown lists the equality conditions like Greater than, Less than, Greater than or equal to, Is between, or Not equal to.

**iii)** The third dropdown has different comparison options:

* Number: You can create numeric comparisons that compare a measure/dimension with a threshold value.

<figure><img src="/files/uH5wHLJWE1433zUeSJh2" alt=""><figcaption><p>Numeric comparisions</p></figcaption></figure>

* Value: You can compare a measure or dimension with another measure or dimension. &#x20;

<figure><img src="/files/X6lXLTcL0y1bDFqolq92" alt=""><figcaption><p>Comparisons with other measures/dimensions</p></figcaption></figure>

* Calculation: Define a basic mathematical formula (addition/subtraction/multiplication/division).

Sample calculations are depicted in the images below.

<div><figure><img src="/files/BIfxMFrquuEmJHPY09NG" alt=""><figcaption><p>Condition to check whether AC &#x3C; 20% of PY</p></figcaption></figure> <figure><img src="/files/YUqaY0jXaggLHlh2Qplg" alt=""><figcaption><p>Condition to check whether AC &#x3C; PY + 10m</p></figcaption></figure></div>

* Analytics: Compare a measure with the average value of the measure.

<figure><img src="/files/Fxn80Lh8vxXMTmU7hACX" alt=""><figcaption><p>Analytics option for creating rules</p></figcaption></figure>

[Learn more about creating conditional formatting rules for charts.](/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules/configuring-rules-for-charts.md)

[Learn more about creating conditional formatting rules for cards.](/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules/configuring-rules-for-cards.md)

[Learn more about creating conditional formatting rules for tables.](/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules/configuring-rules-for-tables.md)


---

# Agent Instructions: 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:

```
GET https://docs.inforiver.com/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
