- 1 Minute to read
- Print
- DarkLight
- PDF
Adding PCR Substitution Variables, Derived Variables, and Expressions to Reports
- 1 Minute to read
- Print
- DarkLight
- PDF
You can add PCR substitution variables and derived variables to reports, just as you can with substitution variables created in Dynamic Planning. You can also create expressions with the PCR variables to simplify report maintenance.
When running a report that includes Substitution Variables, the user can change the value of the substitution variables at run-time by clicking the Substitution Variables button on the menu bar. Note that users cannot changed derived substitution variables, only the standard variables.
In Practice: Substitution Variables Used in a Report
In a report built from a model with direct access to PCR, go to Report > Design.
Select all cells and click Design Manager.
Scroll down to Scenario and click the member selection icon.
Select a Scenario variable, such as @CURBDGT@ or ACTUAL.
Scroll to the Time dimension and click the member selection icon.
Select a Time variable for the year you want to view, such as @CURYR@.
Click Update.
In the spreadsheet, select the column containing Q1 of the year.
Click Design Manager and scroll to the Time dimension. Select the same variable for the year as in step 5.
Before clicking Update, on the Time dimension, click the member selection icon again.
Select Expression.
In the Expression box, click Add Function, then First Child.
Click Update.
In Design Manager, you see the expression as the new value.
Click Update.
Repeat steps 7-14 for each column in the spreadsheet, modifying the expression as needed for the month and quarter to be represented. For example, @CURYR@.FirstChild.FirstChild for the first month of the year. For more examples of expressions, see Example Substitution Variable Expressions.
When done, save the report design.
Going forward, only the @CURYR@ variable needs to be set for the report to be updated.
In Practice: Derived Variables Used in a Report
In this example a report is designed using the @CURYR@ and @CURQTR@ substitution variables and several derived substitution variables. Each substitution variable has a default value. For example, @CURQTR@ is Q4 2014. Derived substitution variable @CURQTR+1@ is Q1 2015.
When the user runs the report, they can click the Substitution Variables button to change the current year and current quarter.
Users are not given the option to change derived substitution variables, such as @CURQTR+1@.
When done, click Refresh to see the changes. By changing @CURQTR@ to Q1 2015, the derived substitution variables automatically change; for example, @CURQTR+2@ is now Q3 2015.