Manage aggregation

Custom Measure Aggregations in Semantic Models with Lumel EPM

When working with semantic data models, there are scenarios where you may need to apply custom aggregations for specific reports. For example, instead of using the default aggregation defined in the data model, such as the sum of quantity sold, you might want to calculate the average quantity sold for more accurate analysis.

Lumel EPM’s aggregation feature enables you to override native measure aggregations without requiring extensive changes at the data model level. This flexibility helps analysts and finance teams tailor calculations to specific reporting needs while preserving the integrity of the underlying model.

With Lumel EPM, you can:

  • Define custom aggregations at the measure or column level

  • Apply aggregation rules at the hierarchy level

  • Control how aggregations behave for row subtotals, column subtotals, and grand totals

This powerful aggregation control ensures consistent, accurate reporting across different business views without duplicating measures or modifying core semantic models.

Row aggregation: You can specify the aggregation to be applied to row subtotals and grand total.

Row aggregation

Column aggregation: You can specify the aggregation to be applied on the column grand total and subtotals.

Column aggregation

We will see in detail about how to set these aggregations below.

Click on the Aggregation button in the Settings tab to open the Manage Aggregation interface.

Manage Aggregation panel

The Manage Aggregation panel offers you three tabs:

  • Measure: Lets you apply the aggregation at the Measure level

  • Hierarchy: Lets you apply the aggregation at the Hierarchy

  • Row Aggregation: Lets you apply aggregation at the Row Level

1. Measure level aggregation

You can specify the row and column aggregation for individual measures and columns from the Measure tab. Select the aggregation type from the dropdown against the measure name.

Measure level row and column aggregation
  • Sum set as row aggregation for 2026 Revenue: The sum of the child rows will be used to populate the row subtotal and grand total.

  • Maximum set as row aggregation for 2026 Gross Margin: The maximum value in the child rows will be used to populate the row subtotal and grand total.

  • Minimum set as column aggregation for 2024 Revenue and Gross Margin: The minimum values in the columns will be used as the column grand total and subtotal.

2. Row Level Aggregation

Row-level aggregation allows you to set the aggregation for each row separately.

In the highlighted example below, the 'Hard Seltzer' category is the sum of its immediate child nodes and has 'Sum' Aggregation, while the 'All' row has an Aggregation type set as 'Minimum'.

Row Level Aggregation

3. Hierarchy Level Aggregation

Hierarchy Level Aggregation allows you to set the aggregation type at the Hierarchical level

Consider the example below, where the category hierarchy aggregation is set as 'Sum'. Each category has the sum of its child nodes.

Hierarchy Level aggregation

4. Aggregation types

Lumel EPM offers various types of aggregation types built in to suit various business needs. Here we will discuss the aggregation types in detail.

Native

By default, the 'Native' option is applied which follows the native summarization set in Power BI.

Native aggregation at report level

None

Choosing 'None' performs no aggregations for the selected measure or hierarchy. In the example below, the 'Units Sold' measure is not aggregated.

Aggregation is 'None'

Sum

'Sum' aggregation displays the sum of the immediate child nodes as the aggregate. In the highlighted example, the 'Nin Alcoholic Beverages' category is the sum of its immediate child nodes.

Aggregation is 'Sum'

Minimum

'Minimum' aggregation displays the minimum value of the immediate child nodes as the aggregate. In the example below, the 'Gross Margin' displays the minimum value among its child nodes which is the value of 'Beer'.

Minimum aggregation type

Maximum

'Maximum' aggregation displays the maximum value of the immediate child nodes as the aggregate. In the image below , the 'Gross Margin' displays the maximum value of its immediate child nodes which is the value of 'Beer'.

Maximum aggregation type at report level

Average (Children)

'Average (Children)' aggregation displays the average value of the immediate child nodes as the row aggregation. In the example below, the 'Gross Margin' measure is aggregated as 'Average (Children)'. The Average of the Categories are calculated under the 'Average(Children)' aggregation.

Average(children) aggregation type
circle-info

When Average excluding zero is selected, the zero values are excluded from being considered for the average calculation.

Average (Leaf)

'Average (Leaf)' aggregation displays the average value of all the leaf nodes of the row category as the row aggregation. In the below example, 'Gross Margin' is calculated as the average of the leaf nodes of all the variant values.

Average(leaf) aggregation type

Standard deviation

'Standard deviation' aggregation displays the standard deviation of the child rows as the aggregate. In the example below, 'Gross Margin' is aggregated as the standard deviation of its child nodes.

Standard Deviation as aggregation type

Visible rounding

'Visible rounding' aggregation rounds off values in a way that the individual values add up properly to the subtotal and grand total. This is a very common requirement in external financial statement reporting, such as the income statement and balance sheet reporting.

Visible Rounding as an aggregation type at report level

Weighted Average

In weighted average aggregation, each child value in a row category is multiplied with weights taken from another measure which are then summed and divided by the total weight.

Weighted moving average = (w1*a1 + w2*a2 +...+wn*an) / (w1+w2+...+wn),

where

n= number of child rows in the row category

w1,w2,w3,....wn = weights (data from measure 1)

a1,a2,a3,........an = data from measure 2

This type of averaging is sometimes more accurate than simple averaging as it considers the varying importance of the data points. This also smoothens any price point fluctuations and is commonly used for inventory accounting, portfolio analysis, statistical research, planning, and forecasting.

The example below calculates the weighted average using the costs and quantities in each region.

i.e., Average Cost for Data Input Measure = [(Quantity*Cost) in Ready to Drink Cocktail+ (Quantity*Cost) in Non-Alcoholic Beverages+ (Quantity*Cost) in Hard Seltzer + (Quantity*Cost) in Beer ] / Total Quantity.

circle-info

Note that weighted average is a row aggregation method – only the total and subtotal rows will reflect the calculation.

Weighted Average as the row aggregation type for data input measure
circle-info

'Weighted Average' aggregation can be applied only to data input, formula, and forecast measures.

Formula

When 'Formula' is selected, then the Formula used for computing the values of the Formula column is used for computing the Totals and Subtotals.

The formula is chosen in the Aggregation type.
circle-info

Applicable only for Formula Columns and Measures.

First

This aggregation type is often used in time-series data or any sequential dataset. The 'First' aggregation type displays the first value from the set of immediate child nodes. This is especially useful when we need to record the dataset's initial state or value.

In the example below, 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.

First aggregation

Last

This aggregation type is used in time-series data or any sequential dataset. The 'Last' aggregation type displays the last value or the latest value from the set of immediate child nodes. This is useful when we need the most recent value in a dataset, especially when budgeting for the following year by carrying over the previous year's value.

In the example below, 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.

Last aggregation

Refer to know in detail about Row Aggregation. Refer to know in detail about Column Aggregation.

Last updated

Was this helpful?