# Managing rules

Inforiver allows you to create different conditional formatting rules, which can be enabled or disabled. Select the manage rules option to open the Conditional Formatting side pane.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FEPgy8wQ5OfCu22tFCRLf%2Fimage.png?alt=media&#x26;token=8d335b8b-a7d1-4532-a483-87a0ee780c69" alt=""><figcaption><p>Manage rules</p></figcaption></figure>

You can create a new rule or edit<img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FD8AioQZ7qUzAWUCYyY8n%2Fimage.png?alt=media&#x26;token=4581b564-f64d-4211-8df3-3000fb5482a1" alt="" data-size="line">/copy<img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FwAPQZzzg7eg9auuORck6%2Fimage.png?alt=media&#x26;token=f2b99df4-405f-4e87-926d-403ae8c46093" alt="" data-size="line">/delete<img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FRNpvUDNXrd1mNXQSuVbf%2Fimage.png?alt=media&#x26;token=22e6c438-ffd4-47e6-8ecb-694d15a28bd2" alt="" data-size="line"> existing rules by clicking the respective icons. You can use the toggle switch to enable or disable a rule.

{% hint style="info" %}
Conditional formatting rules follow an order of precedence - the first rule created gets precedence when there are conflicting or overlapping rules. [Learn more](#id-4.-order-of-precedence).
{% endhint %}

### 1. Managing rules for charts

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FnbdDKdiMOGK8mGM98osy%2Fimage.png?alt=media&#x26;token=5c0f269d-4768-45fc-940b-2fda001e7bf1" alt=""><figcaption><p>Manage conditional formatting rules for charts</p></figcaption></figure>

### 2. Managing rules for cards

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fpf0EXX2Rqa7G2greeAtV%2Fimage.png?alt=media&#x26;token=c9621269-d43a-46a4-8596-01be28a9b31d" alt=""><figcaption><p>Manage conditional formatting rules for cards</p></figcaption></figure>

### 3. Managing rules for tables

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FY7jNx3aRODKMZ6182iKq%2Fimage.png?alt=media&#x26;token=b676a739-a66d-411b-b0cf-24a77bca2555" alt=""><figcaption><p>Options to manage CF rules for tables</p></figcaption></figure>

### 4. Order of precedence

With Analytics+, you can apply multiple conditional formatting rules on the same measure to accentuate different aspects of the data. In the report below, we’ve applied several conditional formatting rules; however, the win and loss formatting only gets applied when we disable the color scale. Wonder why?

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FKJ09QkjLkaOQwWHAodhH%2FUntitled%20Project.gif?alt=media&#x26;token=1955d19a-5c50-4cda-8458-32d4b0853796" alt=""><figcaption><p>Order of precedence in action</p></figcaption></figure>

Analytics+ sees a conflict when it tries to apply a win-loss color to the bars. Since the bars already have a color assigned from the color scale, win-loss color is not applied.&#x20;

While framing rules for conditional formatting, we must be mindful that rules are applied in order of precedence. The first rule created gets precedence when there are conflicting or overlapping rules.

When you need to apply different rules on the same set of data - you can use different formatting options. For instance, if you already have a rule that uses font color, you can use a background color to apply a second rule on the same set of data.

**Order of precedence in cards**

Let's apply a grey background color to the cards that have a variance > 0.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F3Fb0TMx3hUwqt0tdkOhv%2Fimage.png?alt=media&#x26;token=ae203680-7e77-41a2-9309-e94d289a7afd" alt=""><figcaption><p>First conditional formatting rules created</p></figcaption></figure>

When we create an additional rule to highlight the cards that have overall sales > 500m, notice how the background color is not applied to the *EMEA* card, it is only applied to the *East* card. This is because the *EMEA* card already has a grey background color set in the first rule - this will take precedence. However, the KPI formatting is applied and the title color has been changed to red for the EMEA card.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FrJmP9vDZcqCS9PpRyNDq%2Fimage.png?alt=media&#x26;token=7a4b2828-389d-45d6-b760-8f3bc3fbfc50" alt=""><figcaption><p>Order of precedence</p></figcaption></figure>

**Order of precedence in tables**

When comparative measures are involved, Analytics+ automatically calculates the absolute and relative variances. Positive-negative conditional formatting is applied to the relative variance values by default. Consider a scenario wherein we need to highlight the cells where the PY variance is greater than the PL variance. The rule does not get applied as we already have a positive-negative rule applied to the same cells.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FteMR4DfqtK6ctzDVesQ8%2Fimage.png?alt=media&#x26;token=17aaf37a-b3b0-41d3-bcad-4dcfd3f00e28" alt=""><figcaption><p>Applying a CF rule on cells that are already formatted</p></figcaption></figure>

Instead of using cell text, we can use a background color to highlight these values.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FNaEDjXC2W4ORXML7sZf1%2Fimage.png?alt=media&#x26;token=a830f89e-1061-4227-a54a-2b11a6c91f2a" alt=""><figcaption><p>Using an alternate formatting option</p></figcaption></figure>
