0 Replies Latest reply: Jun 7, 2013 7:52 AM by neels.grobler RSS

    Transfer ownership data from one scenario to another in HFM

    neels.grobler
      I'm developing HFM Rules for a company that needs to transfer data from one scenario to another. This is so that they can perform What-if analysis on the other scenario. I can transfer the data correctly using the following code:

      ----

      'This is in Sub Calculate()

      'Check if there is a source scenario and transfer all data if there is
      If HS.Entity.IsBase("","") And HS.Value.Member = "<Entity Currency>" Then
      If Trim(HS.Scenario.UD1("")) <> "" Then
      HS.Clear "A#ALL"
      HS.Exp "A#ALL = S#" & Trim(HS.Scenario.UD1(""))
      End If
      End If

      'Check if there is a destination scenario and set the impact status if there is
      ScenList = HS.Scenario.List("", "[BASE]")
      For CurrScen = LBound(ScenList) To UBound(ScenList)
      If Trim(HS.Scenario.UD1(ScenList(CurrScen))) = HS.Scenario.Member Then
      HS.ImpactStatus "S#" & ScenList(CurrScen)
      End If
      Next

      ----

      If I extend this code to check *HS.Value.Member = "[None]"* and run a calculate on the *[None]* Value Layer, this also copies ownership methods and percentages for the relevant entity. Unfortunately, going to each parent entity and running a calculate for each month is not going to be practical since there are more than 500 entities in this group.

      What I want to do is to actually copy ownership methods and percentages automatically if I run a consol. Is there a way to do either of the following:

      1. Set a value for a POV that is in a different value layer?
      2. Trigger a calculate for a different value layer in the rules?