# Rules (If conditions)

You can apply conditional formatting using font color, style, icons, or background based on one or more IF conditions.

Refer to the [Create Rule](https://docs.inforiver.com/working-with-inforiver/5.-conditional-formatting/create-rule-reporting-matrix) section to get started. Once the rule is created and you can see the Conditional Formatting side panel, follow the steps below.

**STEP 1:** Choose 'Rules (If conditions)' in the **Format by** dropdown. You will see two sections - Style and Conditions.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FNs4gd0AFRkAu8PHu6EAk%2Fimage.png?alt=media&#x26;token=08f41488-df3d-43b4-a8ee-4dcc9f50fda5" alt=""><figcaption><p>Choose Rules(If Conditions) in the Format By dropdown</p></figcaption></figure>

**STEP 2:** Using the **Style** section, you can format text based on color/style, apply a background color, or select icons.&#x20;

**STEP 3:** In the **Conditions** section, you can define conditions using options such as Number, Data selection, Values, Formula, and User Selection.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FJpgguRcZG7mgQy15zQYH%2Fimage.png?alt=media&#x26;token=13dc107e-d141-494b-94b0-5f2f5ca026cd" alt=""><figcaption><p>If conditions</p></figcaption></figure>

**STEP 4:** When you have inline charts in your reports, conditional formatting rules can be applied to the chart labels or the chart itself. Select the desired option(s) from the **Impact on** lis&#x74;**.** Notice how the pin charts and labels are highlighted in blue when 'SalesEnhc' > 4m.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FqgR5Fpi1Bj2lNcpTOnn2%2Fimage.png?alt=media&#x26;token=135230f9-c5ff-4b0b-a04f-66c3bb7f0d9f" alt=""><figcaption><p>Impact on charts</p></figcaption></figure>

Let's look at examples for each of these options.

## Style

* **Font style: bold, italic, underline**

Set the font style based on conditional formatting rules. Notice how we've applied Bold, Italic, and Underlined the values that satisfy the condition. Click on the <img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FlH6lYRtPyIB7uyBM8aPW%2Fimage.png?alt=media&#x26;token=6b91544c-65e9-4f94-a0d4-ad8b2ed4802a" alt="" data-size="line">icon to apply a color to the underline.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FtI0rmYa6mEdVBEiMoB5Q%2Fimage.png?alt=media&#x26;token=4e1f66b3-1db2-4e45-8891-765518f8ebd5" alt=""><figcaption><p>Font style</p></figcaption></figure>

* **Cell background**

Highlight the cells that match a conditional formatting rule by applying a background color.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FhsWK0Z2uZ05GhJBq0aQm%2Fimage.png?alt=media&#x26;token=a1d658ec-d1ea-4355-b45c-143e40cfa7c7" alt=""><figcaption><p>Cell background</p></figcaption></figure>

* **Font color**

Apply a custom font color when a conditional formatting rule is met.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FvGde50kefkPiWgKOIK8d%2Fimage.png?alt=media&#x26;token=e565dd85-4023-4fe4-8617-a62cc50c59ea" alt=""><figcaption><p>Font color</p></figcaption></figure>

* **Cell borders**

Highlight cells that satisfy the conditional formatting rule by setting a custom border. You can choose the border color by clicking the<img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FRhO0i5bLeBGCoQACwlzQ%2Fimage.png?alt=media&#x26;token=a7997702-f702-442b-8912-755756f05167" alt="" data-size="line"> icon.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F6Wr4ixFqd25GnHDzpAAh%2Fimage.png?alt=media&#x26;token=98f69641-753d-455f-95ee-3ea8e381dfad" alt=""><figcaption><p>Cell borders</p></figcaption></figure>

* **Adding icons or text**

Display icons to apply conditional formatting to your data. You can also use custom icons by clicking the Upload Icon link.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F4781wMes4uGxWyQiSWYP%2Fimage.png?alt=media&#x26;token=d37771ec-39ab-45aa-ae9a-beee2e48cb5f" alt=""><figcaption><p>Adding icons</p></figcaption></figure>

You can position the text/icons with respect to the cell values. You can also choose to display only the icons or text and hide the cell values.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FiS1g32vxypBW2cKPG5rN%2FUntitled%20Project.gif?alt=media&#x26;token=e51d8396-c46c-4c21-b26d-54852e1ca5fc" alt=""><figcaption><p>Using icons and text</p></figcaption></figure>

When you use icons, you have an additional option to align your icons in the grid. By default, the icons are left-aligned within the cell.

<div><figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FdUgchTUtdlbR8RlvLmUC%2Fimage.png?alt=media&#x26;token=6d817211-3148-435d-ae8f-619a30a7262e" alt=""><figcaption><p>Left align icon</p></figcaption></figure> <figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FPzEnejGSNzGPTA697O4r%2F2025-07-28_12h59_57.png?alt=media&#x26;token=8d29a9b2-2d8b-4f69-bf7d-691a2b2ad11f" alt=""><figcaption><p>Left align option is disabled</p></figcaption></figure></div>

* **Hiding values**

Business reporting may require withholding certain information to protect strategic interests. You can use conditional formatting rules to mask values based on specific criteria. All the cells with Sales > 35k have been hidden.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FBf8XmQ5ubeeSRLkFlnRi%2Fimage.png?alt=media&#x26;token=55e65b3a-6e94-4630-a1a8-21a147557006" alt=""><figcaption><p>Hiding cell values</p></figcaption></figure>

## Conditions

### 1. Number

In this example, we are highlighting the sales values where sales is greater than 35k. The numbers field supports scaled entries such as 10m.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FZo1Q3vz45iuoaH5hkkbz%2Fimage.png?alt=media&#x26;token=115e465e-9fe7-4577-8189-9be781aff7af" alt=""><figcaption></figcaption></figure>

### 2. Data selection

You can also use a cell value in the condition.&#x20;

2.1. Select 'Data selection' from the dropdown, click on the 'Select value from' textbox, and select a cell in the report. The value gets populated automatically.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FT1dYW2wkTZF2XGdytXrq%2Fimage.png?alt=media&#x26;token=cb2f8f8e-ad0b-44e2-bffb-d916fc7c8fbe" alt=""><figcaption><p>Click the textbox and select the cell</p></figcaption></figure>

Note:&#x20;

* In this example, we have used 'Values and Totals' as the Row hierarchy levels. You can see a new field where you can choose whether conditional formatting needs to be applied to the row grand total or not.&#x20;

The formatting is applied to all the cells where sales are greater than the selected value.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FNqonPLVjhLZJwCjybw0o%2Fimage.png?alt=media&#x26;token=20e4571c-0def-4882-8b3d-3b1148415d31" alt=""><figcaption><p>Conditional formatting based on data selection</p></figcaption></figure>

### 3. Value

You can apply conditional formatting based on another measure in the visual. Let's highlight the cells where 2024 Actuals are greater than the 2023 Actuals.

{% hint style="info" %}
Measures that were added from the data source, auto-calculated variances, columns/measures created using calculations, data input, and simulations can all be used in the IF condition.
{% endhint %}

Select 2023 Actuals from the highlighted dropdown.&#x20;

Note that conditional formatting is applied only to the totals -  Regions, Subregions, and Categories since we have set Row hierarchy levels to 'Totals only' and included the row grand total.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FExwJY6JxmiRNjmdpMXkC%2Fimage.png?alt=media&#x26;token=da4177df-5969-410b-b144-06a43088b524" alt=""><figcaption><p>Conditional formatting based on measure comparison</p></figcaption></figure>

### 4. Formula

You can create simple formulas using either numeric values or measures. Let's highlight the records where 2024 Actuals are greater than the 2024 Plan by at least 1m. Configure the condition as shown.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FD7KTiBqZWmzQ3PJVrpAk%2Fimage.png?alt=media&#x26;token=6dbf8f1b-56e8-4f98-82de-b7883e84322f" alt=""><figcaption><p>Cells highlighted based on formula condition</p></figcaption></figure>

The **Add condition** option lets you create nested AND/OR conditions.&#x20;

Let's consider another example where the conditions are January 2024 Actuals and February 2024 Actuals greater than 5m, and the Sub-regions are Pacific and East.

**STEP 1:** Configure the settings as shown for the first condition and click the Add condition link to enable the radio buttons for AND/OR.

Another condition with default selections is enabled, and an option to select AND/OR. Let's select 'AND' and 'Month' from the dropdown.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FZwcwAK9pzT0K0l8kr10E%2Fimage.png?alt=media&#x26;token=a18163f6-e05e-4f4c-8764-301d8f6b1aae" alt=""><figcaption><p>Adding multiple conditions</p></figcaption></figure>

**STEP 2:** All the months are listed in the Choose members list. Let's select Jan and Feb.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FGAjC95fSLE2eehQ8yyy2%2Fimage.png?alt=media&#x26;token=b4f8728f-555c-41ff-ab58-37b7016c1bdc" alt=""><figcaption><p>Select the months</p></figcaption></figure>

**STEP 3:** Repeat the steps to select the 'East' and 'Pacific' regions.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Ft94LDB2f43OlKmwxwdMC%2Fimage.png?alt=media&#x26;token=c99f11e0-275f-4dbe-bad9-9990d16f663d" alt=""><figcaption><p>Select regions</p></figcaption></figure>

Notice how the cells in the Pacific and East regions for January and February are highlighted.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fmqn8fjdyXXtevg3ztxAC%2Fimage.png?alt=media&#x26;token=518ecfec-99eb-4b63-bdd2-bbbfdc7ff755" alt=""><figcaption><p>Conditional formatting based on multiple conditions</p></figcaption></figure>

### 5. User selection

You can apply conditional formatting based on a selection during runtime, i.e., in the reading view. Let's consider a case where we want conditional formatting to be applied to 2024 Actuals based on a Variance value selected during runtime.

**STEP 1:** Configure the rule as shown.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FZoS6FVbiORDu0yHT6tMj%2F5.2.30%20User%20selection.png?alt=media&#x26;token=3178f918-aaf1-40ef-adea-77df6ee1cb95" alt=""><figcaption><p>Conditional formatting based on user selection</p></figcaption></figure>

**STEP 2:** Click on a value in the PL Variance measure. You can see flag icons in the 2024 Actuals column where the PY Variance is greater than the selected PL Variance.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FcXwvExAsZp1p6QwkZXjv%2Fimage.png?alt=media&#x26;token=ba88734e-03dd-4724-9b1c-7c9e8a589d1c" alt=""><figcaption><p>Conditional formatting applied on user selection</p></figcaption></figure>

### 6. Dates

With Inforiver Reporting Matrix, you can compare date dimensions in rows and columns and automatically format cells based on the comparison. Let's add date dimensions in the row and column parameters. To compare two date dimensions, select the **Compare Date** option. In the example below, we used conditional formatting to highlight the cells where the order date exceeds the ship date.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F5V0yPIUJxrRNlTse2eii%2Fimage.png?alt=media&#x26;token=706cde8c-ad82-424e-968c-9d9a984d4dfb" alt=""><figcaption><p>Comparing dates</p></figcaption></figure>

In the example above, we compared each ship date against each order date and highlighted the cells with the order date greater than the ship date. Instead of comparing each cell, you can also compare a date dimension with the minimum or maximum value of another date dimension. To demonstrate this, let's highlight the cells with the order date greater than the minimum ship date.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F7CQOgjyMbxRfTf6t7uns%2Fimage.png?alt=media&#x26;token=4d59f0f3-edc0-4b05-96a0-1617fe80f9e2" alt=""><figcaption><p>Highlight cells where order date is greater than minimum of ship date</p></figcaption></figure>

You can compare date dimensions against static dates using the Selected Date option and specify the date to be compared against.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FRnoakOfwXWvzTcOkT8Ww%2Fimage.png?alt=media&#x26;token=eb4535c3-3c88-408f-99ff-464fd6b8dd19" alt=""><figcaption><p>Compare dates against static dates</p></figcaption></figure>

### 7. Conditional formatting for data input fields

Highlight your numeric data input fields with conditional formatting. When users enter values, you can specify rules to automatically apply formatting when the rules are satisfied, e.g., spotlight the cells when the budget entered exceeds a certain limit.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FkAyKFrDS9Kv43yKJxppj%2Fimage.png?alt=media&#x26;token=03495899-f6e7-413f-b877-b52ee0ea1024" alt=""><figcaption><p>Highlight cells when users enter budget values that are greater than sales</p></figcaption></figure>

### 8. Rules for non-numeric measures

You can apply conditional formatting to non-numeric measures using conditions like **is blank/is not blank/contains/does not contain,** etc. In this example, we've set a hatched background for the cells with blank customer names.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fp17OdSLP9BITVrekcpRN%2Fimage.png?alt=media&#x26;token=efaa8e4f-98ef-4e68-9bd0-185c4048163a" alt=""><figcaption><p>Applying rules to and creating conditions with non numeric measures</p></figcaption></figure>

Even direct comparison of the texts in the Data input measures is possible using Conditional Formatting.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FY1DthWBCWV2uHLCSufin%2Fimage.png?alt=media&#x26;token=f7cf3206-24e7-4249-a017-1cc570796f75" alt=""><figcaption><p>Comparison of 2 Data input measure columns are shown.</p></figcaption></figure>
