# Conditional coloring

Conditional coloring can be used to highlight items in the hierarchy based on measures. It is advised to create an aggregation to use for conditional coloring. Look at the "Aggregation" page in this wiki for more information on how to set that up.&#x20;

Conditional coloring based on an aggregation on the profit measure might look like the image below, where each negative value is colored pink.

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

To enable this feature, first go to the "Formatting" tab in the "Options" page in the configuration, where you need to select the column/level you want to apply conditional coloring on.&#x20;

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

After setting the level, scroll down to the conditional coloring options.

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

Here, we already selected the sum aggregation on the SUM(Profit) measure to be used for conditional coloring.&#x20;

Select an upper and lower bound to dictate what values should be colored. You can click the colored boxes to change the color.

After which you need to select if you want to color the full background of each item or only the text. After clicking submit, the conditional coloring should be visible on the selected level.

Instead of using an upper and lower bound, you can also select equals coloring to only color items that are exactly equal to the inserted string. In this example we used "Inactive".

<figure><img src="/files/61OktSXnbZG6GVYEMODE" alt=""><figcaption></figcaption></figure>

Latly, you can select the "Gradient" checkbox to color every item from smallest to biggest value on a color gradient.

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


---

# 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.infotopics.com/hierarchyfilter/configuration/conditional-coloring.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.
