# Aggregation

Aggregation can be used to show measures aggregated next to items in the hierarchy tree to have a quick overview of underlaying data. In the image below, aggregation is used to show the sum of all product sales next te each Sub-category in the superstore sample data.

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

To enable this feature, first drag the desired measure or dimension to aggregate on onto the details mark in the datasheet. Secondly, go to the "Formatting" tab in the "Options" page in the configuration, where you need to select the column/level you want to apply aggregation on.

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

After which, you need to select on what measure you want to aggregate on. in the example, we used the sales measure. Right next to the measure selection, you need to specify what type of aggregation should be used to combine multiple values.

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

The number formatting options can be used to customize the decimal point and possible suffix and prefix. Using the percentage number format option automatically calculates the value of the measure time 100. In out example, we used the $ prefix for the sum of sales.

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

Clicking submit will show the selected aggregation in the hierarchy tree.&#x20;

### Bar charts

The bar chart option can be selected to quickly compare different items in the tree based on their aggregation.

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

Enable the "Bar chart" checkbox in the Formatting tab to enable this option.

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

The ranges are automatically  set to the minimum and maximum value of all aggregated numbers in the same level, but these can be adjusted. The bar chart coloring can be used to better differentiate different values based on predefined bounds.&#x20;

Lastly, the gradient option can be used to color the bar charts in a color range from the lowest to the highest number in the set.


---

# 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/aggregation.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.
