Rpt
Rpt
is used when you want a formula to be computed for
the reported, untranslated data only. The calculated data is then translated
and aggregated as defined by the line's rate attribute.
If rpt then
If [Cost] > 100000 then
[Discounts Received] = [Cost] * .1
Else If [Cost] > 5000 then
[Discounts Received] = [Cost] * .05
EndIf
EndIf
In this case,
[Discounts Received]
is calculated in local currency,
translated, and rolled up.
Using
If rpt
has several ramifications.
- The formulas are only executed for leaf data. The results are translated and consolidated into the parent units.
- The formulas are not executed for the period rollup or YTD data.
- The formulas are executed
for leaf periods only. Period rollup is performed after the
rpt
phase.
In various cases, adding
If rpt
can have positive effects on the consolidation
process performance where the formula has a large amount of cross-dimensional
references. One such case is a formula with a large number of cross-dimensional
references. Each of those references can result in a database access so only
evaluating the formula once for only leaf units is a significant performance
gain.
Another example where
If rpt
can have a positive effect is a formula that
computes the value differently depending on which leaf unit it is. For example,
given the following formula:
If memberis([Unit]:[Special Leaf]) then
value=20;
Else
value=10;
If
[Special Leaf]
's parent has one other child, then the
parent's value should be 30, but running the formula would cause the parent's
value to be 10. By qualifying the formula with
If rpt
as shown below,
[Special Leaf]'
s parent unit will have the correct
consolidated value of 30.
If rpt then
If memberis([Unit]:[Special Leaf]) then
value=20;
Else
value=10;
EndIf