﻿ Periodic Accumulation
QPR Knowledge Base 2012.1

# Periodic Accumulation

When elements form a hierarchical structure of parent and child elements, parent elements often need to accumulate values from their child elements. If a parent element has a longer period level than its child elements, conversion is needed for accumulating the values.

The transformation functions are defined for the child elements. To set a periodic accumulation function, select function from the Periodic Accumulation drop-down list in the General tab of the Element Properties window. The selected function will be used when the upper-level element requests values from the lower-level element with different period levels.

The available periodic accumulation functions are as follows:

Average. Return the average of all values to the parent element. All values must exist. This function does not apply to Text series.

Average (ignore missing values). Return the average of all values to the parent element. Any missing values are ignored. This function does not apply to Text series.

First. Return the first value of the first period to the parent element. The first value must exist.

Last. Return the last value of the last period to the parent element. The last value must exist.

Latest. Return the value of the latest period containing a value other than null. Null is returned only if all the periods including the first period are missing a value.

Maximum. Return the highest value to the parent element. Any missing values are ignored. With Text series, this will return the result of the SMAX function.

Minimum. Return the lowest value to the parent element. Any missing values are ignored. With Text series. this will return the result of the SMIN function.

None. If a measure is using an element with this accumulation rule for calculating and its value does not have the same period level, the element with the None accumulation is ignored in calculation.

Sum. Return the sum of all values to the parent element. All values must exist. With Text series, this will return a concatenation of the values from first to last.

Sum (ignore missing values). Return the sum of all values to the parent element. Any missing values are ignored. With Text series, this will return a concatenation of the values from first to last.

Example

Assume that a lower-level element has a period level "Month" and it contains the following values: \$40 (Oct), \$45 (Nov), \$43 (Dec). If a upper-level element has a period level "Quarter", then you can define the periodic accumulation as "Sum" to calculate the value for the element, which is \$128 for the fourth quarter.

Period level and values of the parent element - "Quarter" level

Period level and values of the child element - "Month" level

Notice that value for the second quarter cannot be constructed with Sum, because there is no value for May. In order to accumulate the value for the second quarter, too, Sum (ignore missing values) function should be used instead.