Thursday, April 16, 2015

HFM - Calculation Manager

Calculation Manager and load rule directly in HFM are two methods for HFM rules management. Both of them can work for EPMA and classic HFM. Now today I start to explore the calculation manager usage for HFM.

Open the Calculation Manager and you will find each HFM application contains the folders which are almost the same with HFM's standard rule types.

Expand the Calculate one, we can create a new rule here.

Input the rule's name, and then click OK. Actually it is a sub routine of the main calculate procedure.

The designer mode is a graphical one, you can drag and drop the objects such as Formula and Condition in it.

For example, we can drag a Condition object and drop in the designer.

Click the Add Condition button.

Then we can select a Function here.

For example, we can select the @Value.Currency function here, click OK to continue.

Select a Member for the Value.

Select the member <Entity Currency> in Value Dimension, and then click OK to continue.

Click Add to add this Metadata Condition.

Then you can find the condition is added as below, click OK to continue.

Then it will return to the designer mode, click Save to save it first.

The following information shows, click OK to continue.

Then you can switch to Edit Script mode, to see what's happening for the script.

You can find the rule's script is as below.

Switch it back to Designer mode, drag and drop a Formula object to the "Y" condition.

You can find the object is added here, select Member for the Formula. By default, it will generate an HS.Exp expression for the direct member selection.

Select the member for the formula, click OK to continue.

And then you can select the Variable, Member or Function in the right-hand side for the formula, or only input a number in it. Then click Validate and Save.

The following message shows. Click OK to continue.

So a new rule has been created successfully. Let's move on to create a new ruleset.

Ruleset is the main rule type of the HFM rule, depends on where you create the ruleset it will return to the corresponding rule type. In this case, we create the ruleset under the Calculation folder, so no matter which name we named it, it will return to Sub Calculate() in the HFM rule at the end.

Then you can drag the rule created before and drop it under the new ruleset. Click Save to continue.

Return to the System View of the Calculation Manager. Switch to Deployment View as below.

Expand the "To be Deployed" items, you can find only rulesets can be checked the Deployable CheckBox. Check it on for the Calculation one. (It is a very important step to make the ruleset as deployable.) By default, all the rulesets are not deployed and not validated.

Right-click the HFM application, then you can Validate all the rules at the same time.

Right-click the HFM application again, then we can deploy all the rules this time.

The following message shows, means the deployment is success. Also, you can deploy the rules in the EPMA application library if it is an EMPA application.

Then let's open the HFM application to double check the deployment. Click Extract Rules in the Extract Application Elements page.

The following messages shows, click OK to continue.

Click Download to download the HFM rule.

Then you can open the rule in a text editor. You can find the ruleset is a main rule type and the rule is a sub routine which can be called by the ruleset/main rule type.


  • Rulesets are corresponding to the main standard rule types of HFM (Calculate, Consolidate, Dynamic, Input, NoInput, Translate...)
  • Rules are the sub routines which can be called by the rulesets
  • Mark the rulesets as Deployable, make sure only one ruleset is deployable for each main rule types


Now let's take a look how to create HFM application in EPMA mode. First, create the following dimensions in the Dimension Library. The custom dimensions' number depends on user requirement and 2 custom dimensions is a minimum, the other dimensions are all necessary for an HFM application.

The account dimension has some default HFM accounts. We can create an exchange rate account and a validation account manually.

The exchange rate account and the validation account's properties are as below.

Create members in Year dimension in the number format.

Create 4 generations in the Period dimension with the following settings.

In Scenario dimension, at least one member need to be created.

The member properties are set as below.

Create at least one language in Alias, rather then the Default one.

In the View dimension, create at least 4 members than the default Periodic one.

The Value dimension has the following default members as below.

Create at least one currency in the Currency dimension, rather than the default Local one.

For the custom dimensions, define the properties for each of them as below. Set the Use For Currency, C1: From and C2: To

Now we can create HFM application in the application library. Input the application name and select the application Type to Consolidation. Click Next to continue.

Double check the mandatory dimensions for HFM, select C2 for To Custom and C1 for From Custom. If you need to add more custom dimensions, just select the custom dimensions in the Add Dim drop down box.

After all the dimensions are selected, click Next to continue.

In the property window at the right panel, set the properties of application as below. Then click Validate button and found there are no validation messages to display, which means all the validations are passed. Click Finish to continue.

Then it will return to the dimension library page and found the following view.

Go to the application library, right-click the new created application and then deploy it.

The following page shows, select the Shared Services Project and keep the other settings. Click Deploy to continue.

Then we can click the link to see the progress of the deployment.

Refresh the status until the progress is 100%.

Then we can open the new created HFM application!