- 3 Minutes to read
- Print
- DarkLight
- PDF
Dynamic Planning How to Use Variables in Views and Reports
- 3 Minutes to read
- Print
- DarkLight
- PDF
Variables can be assigned to Views and Reports, which will be used during the execution by the Calculation and will make them more dynamic. For example, let's say you create a map, formula, and scope that have a variable called @CrBudget@ defined. Then, you create a Calculation that uses these artifacts (the map, formula, scope) and the variable called @CrBudget@. When you save data from a View or Report where the @CrBudget@ variable is used, the application passes the selected scenario for execution to the Calculation.
When Variables are used in Views and Reports, for example @CurScenario@, the current scenario is passed to the Calculation. For example, let's say you want to save data for several scenarios, prior to this release you would have had to access the Calculation and change the value for the scenario manually. Now, use a variable and pass the variable automatically from a View or Report without accessing the Calculation and manually changing it.
See Also: Defining Substitution Variables
Example: In this example the @CurScenario@ variable is defined. When data input is performed in the view on the Analyze Data page, the Calculation runs automatically no matter what scenario is selected (Actual or Budget).
The model and view shown below, called Variables Example - Exg Input View, is used to input exchange rate information for local currency for the Actual and Budget scenario. The system calculates the common currency data based on exhange rate and local currency. So, the input is exchange rate and local currency and the output is common currency. Notice that the exchange rate information for the Actual scenario is shown below.
Select the Budget scenario and exchange rate information for that scenario is displayed.
Now, the Data Input View is displayed to perform data input for the Actual scenario as shown below.
As you input data in this View the Calculation is running in the background to automatically calculate the common currency.
When the validation view, called CC Date, is accessed the common currency data is available for the Actual scenario as shown below.
Now, you can select the Budget scenario and input data. As you input data, the Calculation will automatically calculate the Common Currency for the Budget scenario as well. This is because the @CurScenario@ variable is used so the Calculation will execute automatically for whichever scenario is selected as the current scenario.
To assign variables to views:
Access the Design View page.
Select the Properties action. The Variable Name and Dimension fields are displayed.
Enter variable name and select the associated dimension that is defined in the map, formula, and scope. In the example below, the @Scenario@ variable is entered and the Scenario dimension.
Prerequisite:
You must have the variable defined in your formula (accessed by navigating to the Model Formula page). You must use the same variable in your Calculation.
In the example below, the Filter Value on the Model Formula page contains variables for Region and Scenario dimensions.
On the Model Calculation page, there are variables defined for the Formula and Aggregation steps. Budget is specified for the @CurScenario@ variable and North Region is specified for the @CurRegion@ scenario.
When the Budget Model and View is accessed via the Analyze Data page, you can enter the @CurRegion@ and @CurScenario@ variables in the Properties page for the View. In the image below, these variables have been entered in the Properties page and the dimension members selected. Notice that the North Region and the Budget variables are displayed on the page axis.