14. Manage aggregation
Last updated
Last updated
While working with Power BI table/matrix reports, we would sometimes like to apply custom aggregations for the measures in a specific report (e.g., average quantity sold) instead of using the default aggregation used in a data model (e.g., the sum of quantity sold).
Inforiver’s aggregation feature allows you to override the native Power BI aggregation for measures without having to make extensive model-level changes. You can set aggregation at measure/column-level, hierarchy-level, and specify aggregation for the row and column subtotals/grand totals.
Row aggregation: You can specify the aggregation to be applied on row subtotals and grand total.
Column aggregation: You can specify the aggregation to be applied on the column grand total and subtotals.
Click the Aggregation button in the Insert ribbon to open the Manage Aggregation interface.
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.
Sum set as row aggregation for 2024 Plan: The sum of the child rows will be used to populate the row subtotal and grand total.
Maximum set as row aggregation for 2024 Actuals: 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 Actuals and Plan: The minimum values in the columns will be used as the column grand total and subtotal.
The interface shown in the screenshots in this section has changed slightly in newer versions but the functionality remains the same.
By default, the 'Native' option is applied which follows the native summarization set in Power BI.
Choosing 'None' performs no aggregations for the selected measure or hierarchy. In the example below, the 'Discount' measure is not aggregated.
'Sum' aggregation displays the sum of the immediate child nodes as the aggregate. In the highlighted example, the 'Computers' category is the sum of its immediate child nodes.
'Minimum' aggregation displays the minimum value of the immediate child node as the aggregate. In the below example, the 'Computers' category displays the minimum value of its immediate child nodes which is 'Computers Accessories'.
'Maximum' aggregation displays the maximum value of the immediate child node as the aggregate. In the below image, the 'Computers' category displays the maximum value of its immediate child nodes which is 'Projectors and Screens'.
'Average (Children)' aggregation displays the average value of the immediate child nodes as the row aggregation. In the below example, 'Computers' category is calculated as the average of the immediate child nodes i.e. the 'SubCategory' field.
'Average (Leaf)' aggregation displays the average value of all the leaf nodes of the row category as the row aggregation. In the below example, 'Computers' is calculated as the average of the leaf nodes i.e. the 'Class' field.
'Standard deviation' aggregation displays the standard deviation of the child rows as the aggregate. In the below example, 'Computers' is calculated as the standard deviation of its immediate child nodes.
'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.
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 Paseo = [(Quantity*Cost) in Canada + (Quantity*Cost) in France + (Quantity*Cost) in United States + (Quantity*Cost) in Mexico + (Quantity*Cost) in Germany ] / Total Quantity
Note that weighted average is a row aggregation method – only the total and subtotal rows will reflect the calculation.
'Weighted Average' aggregation can be applied only to data input, formula, and forecast measures.