Oracle Customer Engineering & Advocacy Lab (CEAL) Blog covers BI Tech, EPM, BI Cloud and EPM Cloud.

HPCM 11.1.2 - Optimising Calculations in HPCM for Multiple POVs

Jane Story
Senior Principal Applications Specialist - Customer Engineering & Advocacy Lab (CEAL Team)

Calculation scripts in Hyperion Profit and Cost Management (HPCM) are generated and executed by user Point of View (POV) e.g. by Period, , Year, Scenario and Version combination. Therefore, if your model is, for example, a forecast year, you will need to generate and execute 12 calculation scripts (i.e. one for each period). In v11.1.1.x code lines, generation of calculation scripts is done from the user interface. In 11.1.2.x code lines, it is also possible to use web services to automate the run of these calculation scripts.

The previous paragraph is the supported method for generating and executing calculations. However, it is also possible to run user defined scripts on the model. In the same way, it is possible to edit the standard scripts i.e. to create custom user defined scripts. By doing this, it is possible to run 12 periods in a single calculation script execution rather than 12 separate calculation script executions. It is possible to do this if all 12 periods use the same assignments and driver selections. If this is the case, you only need to generate one calculation script, edit it and then execute this script, or scripts, if HPCM generates multiple scripts per stage, for all 12 periods. This requires only some minor customisation of the script.

In v11.1.1.x code lines, there are four types of calculation script allocation interstage, allocation intrastage, driver interstage and driver intrastage. In v11.1.2.x code lines, the allocation and driver scripts are combined meaning there are only two types of scripts: interstage and intrastage. The number of scripts can vary depending on the number of assignments in the model. Therefore, it is possible that the number and content of the scripts can vary depending on the number of assignments loaded into the model. Also, these scripts can be edited, after generation, to modify as needed i.e. in order that they may run for multiple periods in a single calculation script.

Let’s look at the first section of a calculation script from the Bikes sample model (in this case, a v11.1.2.x script):

VAR driverTotal = 0.0;

VAR IntraStageOut = 0.0;

VAR InterStageOut = 0.0;

Fix( "[Year].[2010]", "[Period].[January]", "[Scenario].[Actual]" )

This model has three POV dimensions: Year, Period and Scenario. You can also see that three variables are used: driverTOTAL, IntraStageOut and InterStageOut. These variables are used multiple times in the script. For example:

"CostReceivedPriorStage" ( InterStageOut
= InterStageOut +


Because the script uses variables, we cannot simply change the Period reference to be Jan:Dec. Therefore, we have to change the Period referenced and to ensure that each Period member is calculated correctly, we must change the VAR statements to be ARRAY.

In practice, it is possible to generate a single POV script and then automate the necessary replacements.

If the HPCM model is used for multiple scenarios (e.g. Actual which will calculate only 1 month and Forecast that will calculate 12 months), it is possible to automate the replacement so that in both cases the script will run the selected periods. To do this, replace the actual period and year references with substitution variables if required (for example, &HPCMYear for Year and &HPCMMth for Period). Then using MAXL, the period for the calculation can be changed from 1 month to 12 months, in our example, without the need for a separate automation programme for each Scenario.

Once the single script is generated, make the following replacements before the script is executed.



VAR DriverTotal = 0.00

VAR IntraStageOut = 0.0;

VAR InterStageOut = 0.0;

ARRAY DriverTotal [Period];

ARRAY IntraStageOut [Period];

ARRAY InterStageOut [Period];

All occurrences of the POV fix, for example:

Fix( "[Year].[2010]", "[Period].[January]", "[Scenario].[Actual]" )

Change to:

Fix( &HPCMYr,&HPCMMth, "[Scenario].[Actual]" )

The modified script will look like this (all fixes with the POV being amended in a similar way). All other sections of the script are unchanged and will use the Array references instead of the VAR references in the original script.

ARRAY DriverTotal [Period];

ARRAY IntraStageOut [Period];

ARRAY InterStageOut [Period];

Fix( &HPCMYr,&HPCMMth, "[Scenario].[Actual]" )

In this way, when this single calculation is executed, 12 months will be calculated.

If the calculation scripts in HPCM are customised in this way, it is still possible to transfer data and run genealogy in the usual way.



  • This method can only be used if the assignments and driver selections etc are the same for all periods. Amending the fix means that all periods will be calculated using the same assignments and driver selections.
  • Regeneration of the calculation scripts in HPCM will overwrite the customisation and so the replacements will have to be repeated after every script generation.


  • Use a script to modify the calculation scripts to prevent manual errors. It is advisable to keep a copy of the HPCM generated scripts for comparison and also to restart the edit process should it be required.


This and any customisation of HPCM generated calculation scripts is not supported. Therefore, if you need to raise a support request relating to these scripts, the customisation must be removed first.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Integrated Cloud Applications & Platform Services