AVERYTD2
Syntax: AVERYTD2 (account, actuality, period, number of periods/start period)
Specify a start period in the relative format (for example 'N112' or 'P001') to create a dynamic interval. Or specify the number of periods to always use the same number of periods in the calculation.
IBM® Cognos® Controller uses the start period in combination with the period argument so that the number of periods to include in the average calculation each time you run the function. If you set period to '+0' and start period to 'P001', then the average calculation starts from the first period of the financial year (P001) and ends with the current period (+0). The current period is the period that you select at run time.
If you use AVERYTD2 in a dimensional advanced formula calculation, then AVERYTD2 has an aggregation effect as was exemplified in the numerator-denominator example. However, empty periods are rare.
Missing data is interpreted as missing. The next table shows the result for AVERYTD2(#account#, AC, +0, 4)
| Dim combination | PER-3 | PER-2 | PER-1 | PER | AVERYTD1 |
|---|---|---|---|---|---|
| EU CAR | 1 | 3 | 4 | 2.66 (8/3) | |
| EU BIKE | 1 | 2 | 1 | 1.33 (4/3) | |
| US CAR | 1 | 6 | 1 | 4 | 3 (12/4) |
| US BIKE |