2 Replies Latest reply on Oct 23, 2012 11:32 AM by 874292

    Sub Calculate ()

      Hi experts,

      I have written a 'Very Simple' rule just to understand how HFM rules work.

      Sub Calculate ()
      HS.A#Stock - RM = Some number (say 10).
      End Sub

      Firstly, I don't know whether the above mentioned rule is 'Correct'. I think, it is correct because, I don't get any error when I load rules to HFM.

      Secondly, I can't find out where this number is actually residing (intersection). The admin guide states if I don't mention ICP, system will consider ICP [NONE].

      I would appreciate your help.

      Thanks in advance.

      Edited by: 491087 on Oct 17, 2012 11:40 AM
        • 1. Re: Sub Calculate ()
          I can give some general help as I'm not sure what version of HFM you're using or how you're going about editing the rules (HFM Rules Editor, notepad++, some other text editor).

          I notice two major issues right away:

          1.) The function you're trying to use is not valid. (HS.A#)

          In order to write a value to a specific intersection, you need to write an expression using the function HS.Exp. For more review of the rules and functions, review the admin guide chapters 10 and 11 (http://docs.oracle.com/cd/E17236_01/epm.1112/hfm_admin.pdf). These chapters provide walkthroughs of function usage and correct syntax.

          2.) Your syntax is invalid and your account name contains a logical expression ( - ).

          Page 75 of the Admin Guide PDF from the link above says not to use any of a list of disallowed characters in your account name metadata. First, modify your account name. I'll use (Stock_RM)... Then, to write a simple rule that pushes a value to an account, you need to use the HS.EXP function I mentioned, and then correct quotations surrounding your formula (no matter how simple it is). For example:

          HS.EXP "A#Stock_RM = 10"

          How the value in this account is treated depends on several factors. What are the valid intersections for this account? What is the account type? Have you previously limited the valid intersections with an IF statement in the rules file (IF HS.Entity.IsBase Then, etc.)? These are factors you'll need to consider during your rules development.

          When you get to more complicated calculations, I would also recommend that in advance of an HS.EXP, you place an HS.Clear statement for the whole account (HS.Clear "A#Stock_RM"). When you get to each entity's calculation of this value it will clear out ALL intersections and then recalculate the value of this account. This has saved me several times when I experienced "data explosion" in the application because I opened a calculation to a Custom dimension and wrote the same value to 200+ intersections.

          • 2. Re: Sub Calculate ()

            Can you try below action and let me know results.

            ++Unlock the relevant Year, Scenario, Entity and Value dimensions for the appropriate periods. This may require unlocking the entire application.
            ++Run Consolidate All With Data on affected hierarchies. Active account should update appropriately so that a particular entity is not consolidated twice under different parents.
            ++After consolidations are complete, the entity hierarchy should then be locked for the appropriate POV.