Skip to content

mapExternalProjectionValues

Similar behaviour to mapProjectionValues, with some additional functionality added:

  • All hierarchy nodes on the given hierarchy level are considered, not just the current branch (i.e. not just ancestors and descendents of the current hierarchy node).
  • Filter hierarchy nodes by hierarchy property values.

Signature

mapExternalProjectionValues(
    hPropertyName,
    hPropertyValue,
    varName=varName,
    valnType=valnType,
    hLevel=hLevel,
    valnDate=valnDate
    timeShift=0,
    resolvemulti="sum"
)

Arguments

Arguments are same as mapProjectionValues, except for:

hPropertyName
The name of the hierarchy property in which we should look for a matching hPropertyValue.
hPropertyValue
The value of the hierarchy property on which to match in the hPropertyName.

Examples

Note

In the examples below, whenever a valuation date is mentioned, we only use the month name, for brevity. Instead of February, you would write something like DATE(2021,2,28) or EOMONTH(DATE(2021,2,1),0).

The examples below are all demonstrated in this example workbook.

The provided model has the following company hierarchy:

╌╌╌╌╌╌╌╌ Nodes ╌╌╌╌╌╌╌ │ ╌╌╌╌╌╌╌╌╌╌╌ Properties ╌╌╌╌╌╌╌╌╌╌╌╌╌
Name           │ Level │ h1Side  │ h2Side  │ h3Side  │ foo
───────────────┼───────┼─────────┼─────────┼─────────┼───────
RootNode       │ 4     │         │         │         │
├─NodeA        │ 3     │         │         │ "left"  │
│ ├─NodeA1     │ 2     │         │ "left"  │         │ FALSE
│ │ ├─NodeA1i  │ 1     │ "left"  │         │         │ FALSE
│ │ └─NodeA1ii │ 1     │ "right" │         │         │ FALSE
│ └─NodeA2     │ 2     │         │ "right" │         │ TRUE
│   ├─NodeA2i  │ 1     │ "left"  │         │         │ TRUE
│   └─NodeA2ii │ 1     │ "right" │         │         │ TRUE
└─NodeB        │ 3     │         │         │ "right" │
  ├─NodeB1     │ 2     │         │ "left"  │         │ TRUE
  │ ├─NodeB1i  │ 1     │ "left"  │         │         │ TRUE
  │ └─NodeB1ii │ 1     │ "right" │         │         │ TRUE
  └─NodeB2     │ 2     │         │ "right" │         │ FALSE
    ├─NodeB2i  │ 1     │ "left"  │         │         │ FALSE
    └─NodeB2ii │ 1     │ "right" │         │         │ FALSE

A higher hierarchy level

Variable MepvHigher on hierarchy node NodeA1 using valuation type valnTypeA has the following formula:

mapExternalProjectionValues(
  "h3Side",
  "right",
  "VarA",
  "valnTypeB",
  hLevel+1,
  valnDate,
  0,
  "sum"
)

This maps data from variable VarA on hierarchy node NodeB using valuation type valnTypeB.

A lower hierarchy level

Variable MepvLower on hierarchy node NodeA1 using valuation type valnTypeA has the following formula:

mapExternalProjectionValues(
  "h1Side",
  "left",
  "VarA",
  "valnTypeB",
  hLevel-1,
  valnDate,
  0,
  "sum"
)

This maps data from variable VarA on hierarchy nodes NodeA1i, NodeA2i, NodeB1i and NodeB2i, using valuation type valnTypeB.

The same hierarchy level

Variable MepvSame on hierarchy node NodeA1 using valuation type valnTypeA has the following formula:

mapExternalProjectionValues(
  "foo",
  TRUE,
  "VarA",
  "valnTypeB",
  hLevel,
  valnDate,
  0,
  "sum"
)

This maps data from variable VarA on hierarchy nodes NodeA2 and NodeB1, using valuation type valnTypeB.