---
title: "Aggregating Dimensions"
description: "The dimension aggregation function determines how the values of different dimension items are combined into one value. This affects the summary value when a variable is collapsed, aggregating the variable in formulas and grouping by other dimensions (see Dimension modifiers)."
source_url: https://support.lucanet.com/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/using-dimensions/aggregating-dimensions
language: en
last_updated: 2026-05-01
---
# Aggregating Dimensions in Lucanet xP&A

## Overview

The **dimension aggregation** function in Lucanet xP&A (Extended Planning & Analysis) determines how the values of different dimension items are **combined into one value.** This affects the summary value when a variable is collapsed, aggregating the variable in formulas and grouping by other dimensions (see [Dimension modifiers](https://support.lucanet.com/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/variable-modifiers.md)).

## Configuring the Dimension Aggregation in xP&A

By default, xP&A **sums up** all dimension items when aggregating a variable. To change this, right-click the variable and select a different **Dimension Aggregation**.

For example, if you have split **Employee Benefits** input by **Department**, it might be more appropriate to see the average of the **Departments**, not the total.

![Shows the right-click context menu on the 'Employee Benefits' variable in xP&A. Highlighted in red are 'Aggregation' > 'Dimension aggregation', with 'Average' currently selected from the options 'Sum', 'Average', 'Median', 'Min', 'Max', 'Formula', and 'No Aggregation'.](https://support.lucanet.com/assets/docs-images/xp-a---extended-planning-and-analysis/modeling-your-data/using-dimensions/aggregating-dimensions/_images/en/category-aggregation.png)
Changing the Dimension Aggregation

## Dimension Aggregation Options in xP&A

The available dimension aggregation options in xP&A are:

- **No Aggregation**: can be used when there is no meaningful way to aggregate a variable - it will just show a dash instead of any number.
- **Average**: takes the average value of items in the dimension
- **Min and Max**: takes the minimum or the maximum value of the dimension
- **Median**: takes the median value of all the items within this dimension

> **Note:** **Note**, if the variable has many dimensions, the median value will be calculated over the **lowest level** cells. E.g. if you have **Sales** variable broken down by **Profit Centre A**/ **Profit Centre B** and **Product 1**/ **Product 2**, the total median value for **Sales** will be calculated over four data cells that have both **Profit Centre** and **Product** specified

- **Formula**: uses the variable's formula at the 'aggregate' level, to calculate an aggregation value.

  - A good example of this is to think of gross margin across two different centres:
    - Profit Centre A - $100K in Net Sales, $90K in Costs - Gross margin is 10%
    - Profit Centre B - $1M in Net sales, $500k in Costs - Gross margin is 50%
  - By default, xP&A will display the **Gross Margin** variable (**Net Sales-Revenue**)/ **Net Sales** as a **Sum** \- so we would see 60% as our top-level **Gross Margin**.
  - A common way around this is to use the **Average** dimension aggregation, which would display a 30% **Gross Margin**. This value is also incorrect, as **Profit Centre B** has much higher net-sales, and its impact to margin should be greater than **Profit Centre A**.
  - Logically - the way to do this calculation appropriately would be to add the sales and costs of both profit centres, and then apply the calculation. This is what the **Formula** dimension aggregation helps us achieve, giving us the correct value of 46.4%.
