# Column aggregation

In addition to configuring the row aggregation, you can also configure the column aggregation. Like row aggregation, which only applies to sub-total and grand-total rows, column aggregation applies only to the subtotal and grand-total columns.

Let us first demonstrate these aggregations for total rows with a few examples, followed by the 'Manage Aggregation' dialog box where you can perform both row and column aggregations in tandem.

### 1. Column aggregation for a total cell

To apply column aggregation, click on the cell in the grand-total/subtotal column and select the aggregation type from the dropdown menu.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1528).png" alt=""><figcaption><p>Click on the 'Aggregation' drop-down</p></figcaption></figure>

{% hint style="info" %}
The Aggregation drop-down menu gets enabled when you click on any cell that aggregates rows and/or columns.
{% endhint %}

You can see in the above example the default aggregation is the sum of column values for the 'Aqua Splash' brand.

Let us now change it to 'Maximum'.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1529).png" alt=""><figcaption><p>Changing aggregation to 'Maximum'</p></figcaption></figure>

As a result, the grand total is populated with the maximum value of all the quarters.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1530).png" alt=""><figcaption><p>'Maximum' aggregation type - grand total</p></figcaption></figure>

Note that for the same row, the sub-totals for each quarter are also aggregated in the same way to display the maximum value.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1532).png" alt=""><figcaption><p>'Maximum' aggregation type - sub totals</p></figcaption></figure>

### 2. Column aggregation for repetitive categories

When you have the same category repeated across all levels of the hierarchy, Plan will detect repeating categories and allow you to apply the same column aggregation method to all the levels in a single click.

Let us assume we want to change the column aggregation method for the category 'Beer' in the 'Artisan Ale' brand. Click on the grand total cell and select **Aggregation.** Note that only column aggregation is applicable here as it is a leaf row.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1533).png" alt=""><figcaption><p>Aggregation for repetitive sub-category</p></figcaption></figure>

Let us now change it to 'Average'.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1536).png" alt=""><figcaption><p>Click 'Average (Children)'</p></figcaption></figure>

When you click the option 'Average (Children)', a pop-up is displayed to confirm whether you want to apply the same aggregation to all the 'Beer' rows in all the regions.

<figure><img src="/files/1R4MQWNNK19eAoyLeToi" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1534).png" alt=""><figcaption><p>Confirm to change for all the rows</p></figcaption></figure>

Click **Yes** to update all 'Beer' rows with the 'Average' aggregation method.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1535).png" alt=""><figcaption><p>Average aggregation applied to repeated categories</p></figcaption></figure>

This ensures that the same aggregation is applied to all the repetitive categories/sub-categories in one go.

{% hint style="info" %}
Click **No** in the above confirmation pop-up to apply the aggregation only to that specific row.
{% endhint %}

### 3. Combining row and column aggregations

Plan lets you seamlessly track the various aggregations applied to the rows and columns with the 'Manage Aggregation' dialog box.

In the example below, both row and column aggregations are set to 'Sum' for the 'Beer' category.

<figure><img src="/files/kC3XmCFp5sjMpz0VWuH0" alt=""><figcaption><p>Both aggregations are 'Sum'</p></figcaption></figure>

<figure><img src="/files/0QSmBUvz1FV3Ri2piLaF" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1515).png" alt=""><figcaption><p>Both aggregations are 'Sum'</p></figcaption></figure>

Let us now set the column aggregation to 'Maximum' while retaining the row aggregation to 'Sum'. To do this, click the required cell and select **Aggregation -> Maximum.**

<figure><img src="/files/EubFB0s9jjAyQBUk9J8u" alt=""><figcaption><p>Column aggregation is set to 'Maximum'</p></figcaption></figure>

The column total now has the maximum value of the four quarters.

<figure><img src="/files/LST7uJMsh6bbtR4I0z4P" alt=""><figcaption><p>Row and Column Aggregation is set</p></figcaption></figure>

You can track the same and also edit them with the 'Manage Aggregation' dialog box as illustrated below:

<figure><img src="/files/7KHomdQBTccarvU3aI8w" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(1519).png" alt=""><figcaption><p>Manage Aggregation dialog box.</p></figcaption></figure>

### 4. First/Last column aggregation

P\&L or cash flow statements often require the values from the first or last periods as the column subtotals and grand totals. These aggregation types are applicable only at the column level.

• **First aggregation type:** The values from the first period are used for the column subtotals and grand totals. In the example, the Revenue from Q1 2026 is used as the subtotals at the year level. The Revenue from 2024 (the earliest year) is used for the grand total.

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

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/7.1.%20First%20aggregation%20type.png" alt=""><figcaption><p>First aggregation</p></figcaption></figure>

• **Last aggregation type:** The last period is used to populate the grand totals and subtotals. The Revenue of Q4-2026 is used to populate the yearly subtotal. The Revenue of 2026 is used to populate the grand total.

<figure><img src="/files/1SIJuc8BENUeoiOY5t94" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/7.2.%20Last%20aggregation%20type.png" alt=""><figcaption><p>Last aggregation</p></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.fabricplan.com/planning-sheets/how-tos/7.-planning-budgeting-and-forecasting/column-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.
