# 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="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FmoXZwmu9LsWt4EQWG8wn%2Fimage.png?alt=media&#x26;token=bbdc91fb-fe32-4bbd-a05a-c0823a26d467" 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="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FIAgpcekflcvdDdaeI9y9%2Fimage.png?alt=media&#x26;token=3ec28818-f422-4cdb-b72e-b6b954ee79a0" 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="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FY8zPuvkAkkVTZbN78jKa%2Fimage.png?alt=media&#x26;token=07518e7d-f46e-4987-bf48-f500af786792" 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="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fmh6ksZkQhxG42fbH3i2T%2Fimage.png?alt=media&#x26;token=8a7c7e3f-eb30-4f38-8f94-fa4075893dc5" alt=""><figcaption><p>Condition to check whether AC &#x3C; 20% of PY</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FA1cbfvPDfI1v0LShGdpR%2F2024-04-25_16h00_11.png?alt=media&#x26;token=6be96d21-6038-4c9a-aae3-9281eb1c73f0" 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="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F7mPh2IpmJ9jjQPCToXSp%2Fimage.png?alt=media&#x26;token=9f5ae090-c470-4522-99bd-9497fb8389b1" alt=""><figcaption><p>Analytics option for creating rules</p></figcaption></figure>

[Learn more about creating conditional formatting rules for charts.](https://docs.inforiver.com/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules/configuring-rules-for-charts)

[Learn more about creating conditional formatting rules for cards.](https://docs.inforiver.com/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules/configuring-rules-for-cards)

[Learn more about creating conditional formatting rules for tables.](https://docs.inforiver.com/analytics+/working-with-analytics+/9.-conditional-formatting/configuring-rules/configuring-rules-for-tables)
