# Conditional formatting

## **Inputs for Single Rule Type**

<figure><img src="/files/fcgiMoqCIxhPlJwmNO9k" alt=""><figcaption></figcaption></figure>

**Value Field**

Select a field from the available data to evaluate.

**Aggregation**

Choose how the data will be summarized:

* **None**
* **Sum**
* **Average**
* **Min**
* **Max**
* **First**
* **Last**

**Comparator**

Specify the comparison condition:

* **Equal To**
* **Not Equal To**
* **Less Than**
* **Greater Than**
* **Less Than Or Equal To**
* **Greater Than Or Equal To**
* **In Range**
* **Not In Range**

**Value Type**

Define how values are entered:

* **Fixed**
* **Type Field**

**Value/Field**

Enter the value or select a field for comparison.

**Color**

Set the color to apply when the rule conditions are met.

***

## Inputs for Compare Rule Type

<figure><img src="/files/kdND4T9kB2cLsCXHQUTr" alt=""><figcaption></figcaption></figure>

* Value Field: Select a data field to evaluate.
* Condition: Choose from the following comparison methods:

| Compare first value with next value     | Evaluate the difference between the first data point and the next one in the dataset. |
| --------------------------------------- | ------------------------------------------------------------------------------------- |
| Compare first value with fixed value    | Check how the first data point compares to a constant value.                          |
| Compare first value with target value   | Determine if the first data point aligns with a target value.                         |
| Compare first value with last value     | Measure changes from the first to the final data point.                               |
| Compare last value with fixed value     | Compare the last data point to a constant value.                                      |
| Compare last value with target value    | Check if the last data point meets a target value.                                    |
| Compare last value with first value     | Identify trends by comparing the last and first data points.                          |
| Compare last value with previous value  | Examine differences between the last and previous data points.                        |
| Compare max value with fixed value      | See how the highest value compares to a constant.                                     |
| Compare max value with target value     | Assess whether the maximum value aligns with a target.                                |
| Compare average value with fixed value  | Compare the average of the dataset to a fixed benchmark.                              |
| Compare average value with target value | Evaluate the dataset’s mean against a target.                                         |
| Compare total value with fixed value    | Match the dataset’s total to a fixed value.                                           |
| Compare total value with target value   | Check if the dataset’s total meets a specified target.                                |

* Target Field/By Category/Value Field: Specify the target or category for comparison.
* Sort Order: Select the sorting method:
  * Ascending
  * Descending
* Condition:
  * More is better
  * Less is better
* Colors:
  * Good
  * Neutral
  * Bad


---

# 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.powerviz.ai/powerviz/kpi/edit-mode-introduction/kpi-charts/conditional-formatting.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.
