CopyLastPeriodMeasure macro

The CopyLastPeriodMeasure macro is used to copy the measure data from the scenario of the last completed Cycle period to the current Cycle period scenario. This macro is executed at scenario level.
The macro parameters determine the measures to be copied, the scenario and the cycle period. This table lists the parameters to execute the CopyLastPeriodMeasure macro.
Parameter Description
Scenario The scenario name of the previous Cycle period from which the measure data is copied.
Note: The scenario name of the previous Cycle period from which the measure data is copied.
From Measure Code The measure in the previous Cycle period to be copied.
Note: If this value is not specified, all published and internal measure for the selected module is considered.
To Measure Code The measure in the current Cycle period to which the values are copied.
Note: If the value is not specified, the value in the From Measure Code is considered.
Period Label The period duration to be copied:

If ‘Use Destination Period Label’ = False or is not defined:

  • Defines Periods in the previous cycle period from which the measure is to be copied. This includes the base-level children elements (at calendar level to store scenario values) of the specified period label.
  • If the value is not specified, all horizon for the previous Cycle period (including pconst) are considered.
  • The current Cycle period may not include the period label (at aggregate level). The period matching is at the base level and only the periods that are matched, are copied.

If ‘Use Destination Period Label’ = True:

  • Defines Periods in the current cycle period to which the measure is to be copied. This includes the base-level children elements (at calendar level to store scenario values) of the specified period label.
  • If the value is not specified, all horizon for the for the current Cycle period (including pconst) are considered.
  • The previous Cycle period may not include the period label (at aggregate level). The period matching is at the base level and only the periods that are matched, are copied.
Note: 
  • Rolling period nodes such as ‘Future Horizon’, Year to Date’ are supported.
  • If the copied measure is of Transactional Data type, the Period Label refers to ‘To Date’ (Received/End) of the transactional data.
Overwrite Indicates if the data at the destination is overwritten with the source data. Possible values:
  • TRUE: The data at the destination is overwritten with the source data. The existing data in a destination cell is retained, if the source value is zero or null.
  • FALSE: The data from the source is added to the data at destination.
Note: By default, this value is set to FALSE.
Use Destination Period Label Indicates if the Period label in the destination cycle period calendar is considered. Possible values:
  • TRUE: Refers to the destination cycle period calendar.
  • FALSE: Refers to the source cycle period calendar.
Note: By default, this value is set to FALSE.
The value for the Command field must be specified in this format:CopyLastPeriodMeasure([Scenario], [From Measure Code], [To Measure Code], [Period label],[Overwrite],[Use Destination Period Label]).
Note: The optional Parameters are specified in [ ].
Table 1. Example
Requirements Parameter
Copy all measures from the previous cycle periods published scenario and for all the periods in the previous cycle period horizon, using the same destination measure. This includes scenario values at const elements (iconst, lconst and pconst) for the copied measures.

CopyLastPeriodMeasure("","") CopyLastPeriodMeasure("","","","","","")

Copy all measures from the previous cycle period for the baseline scenario and for all the periods in the previous cycle period horizon, using the same destination measure. This includes scenario values at const elements (iconst, lconst and pconst) for the copied measures. CopyLastPeriodMeasure("Baseline","")
Copy the FREV measure from the previous cycle period for the baseline scenario and for all the periods in the previous cycle period horizon, using the same destination measure. This includes scenario values at const elements (iconst, lconst and pconst) for the FREV measure. CopyLastPeriodMeasure("Baseline","FREV")
Copy the FREV measure from the previous cycle period for the baseline scenario and for all the periods in the previous cycle period horizon, to the BREV measure of the current cycle period and current scenario. This includes scenario values at const elements (iconst, lconst and pconst) for the FREV measure.

CopyLastPeriodMeasure ("Baseline","FREV","BREV","","","")

Copy the FREV measure from the previous cycle period baseline scenario to the current scenario. for the base-level periods which exist at or under the [FY12 M01] node in the previous cycle period, using the same destination measure. This includes scenario values at iconst and lconst for the FREV measure.

CopyLastPeriodMeasure ("Baseline","FREV","","FY12 M01","","")

Copy the FUNITS measure from the previous cycle period Baseline scenario to the HUNITS measure of the current cycle period scenario for the base-level periods defined under the "LastPeriod" period in the destination cycle period. This Includes scenario values at iconst and lconst for the FUNITS measure.

Assume that, there is a virtual period node built from the rolling period definition "Last Period" in the current/destination cycle period. The macro copies measure data from the previous cycle period for all the matching base-level periods under this virtual node in the current cycle period (I.e. Run above example in cycle period "Jan 12", copying from source period "Dec 11". Last Period (History = 1): [FY11 W48], [FY11 W49], [FY11 W50], [FY11 W51], [FY11 W52] where periodicity = Monthly and Calendar level to store scenario values = Weekly; or [FY11 W52] where periodicity = Weekly and Calendar level to store scenario values = Weekly).

CopyLastPeriodMeasure ("Baseline","FUNITS","HUNITS","Last Period","","TRUE")