# Row aggregation

If your data is hierarchical, **Plan** provides flexible options to apply **row aggregations** across all branches at a selected hierarchy level. This allows you to define **different aggregation methods for multiple hierarchy levels at the same time**, ensuring accurate and consistent data rollups.

To apply a **uniform aggregation method** to a specific hierarchy level, go to **Settings > Aggregation >** the **Hierarchy** tab in the **Manage Aggregation** dialog box. From there, you can easily assign and manage **different aggregation methods for each hierarchy level**, giving you full control over how hierarchical data is calculated and analyzed.

Row aggregation only applies to sub-total and grand-total rows.

{% hint style="warning" %}
The aggregation type set in the Hierarchy tab will not be applied to formula measures or quick measures created in the Planning sheet.
{% endhint %}

<figure><img src="/files/rPao38Tl8NV1ALYtJ34j" alt=""><figcaption><p>Aggregation set for hierarchy levels</p></figcaption></figure>

The specified aggregation method is set for a specific level of the hierarchy.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(694).png" alt=""><figcaption><p>Hierarchy-level aggregation</p></figcaption></figure>

### Other methods to set row aggregation

#### 1. Setting aggregation from manage columns

Another way to set row aggregation for measures is by clicking on **Manage Columns** and then the ![](/files/lj5foH8KX1Xbab61GqtL) icon. This allows you to manage row aggregations for specific measures.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1537).png" alt=""><figcaption><p>Settings in 'Manage Columns' dropdown</p></figcaption></figure>

A pop-up displays a list of measures under the **Display** section. You can change both the Row and Column aggregation types of multiple measures here.

<figure><img src="/files/zFN9ZQJPnEeXsjS4BoZv" alt=""><figcaption><p>Manage columns pop-up</p></figcaption></figure>

Let's change the Row aggregation for 'Revenue' to 'Minimum' and 'Gross Margin' to 'Maximum'.

<figure><img src="/files/BqzeIi65zduNIVDMF4Vn" alt=""><figcaption><p>Row aggregation</p></figcaption></figure>

{% hint style="info" %}
You cannot set aggregation for a simulation measure.
{% endhint %}

Note that the [row aggregation type](/planning-sheets/how-tos/adding-business-logic-and-formulae/measures-and-columns/insert-manual-input-columns/insert-manual-input-columns.md#i-row-aggregation-type) for calculated columns and manual data input columns can also be defined here in the **Manage Columns** dialog box in addition to the **Insert formula** and **Data input** [side panels](https://docs.fabricplan.com/planning-sheets/how-tos/adding-business-logic-and-formulae/manage-aggregation/pages/d1U162wTDoFssKWgWuRI#id-3.-properties).

#### 2. Setting aggregation from column gripper

To set aggregation for a specific measure, you can also click on that column's gripper and choose 'Aggregation' from the context menu as shown below. Click on the required aggregation type to apply it to that measure.

In the example below, the 'Gross Margin' measure has been aggregated to display the maximum value of the child rows using the aggregation method 'Maximum'.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1930).png" alt=""><figcaption><p>Set aggregation from the column gripper</p></figcaption></figure>

To learn how to manage column aggregations, click [here](/planning-sheets/how-tos/7.-planning-budgeting-and-forecasting/column-aggregation.md).


---

# 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.fabricplan.com/planning-sheets/how-tos/adding-business-logic-and-formulae/manage-aggregation/row-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.
