Custom_Alloc

This function allocates a Source point of view (POV) to a Destination POV using a Factor POV as the basis of Allocation, with the option to reverse post the total allocated amount to an Elimination POV. This function is designed for custom dimension allocations.

Return Value

No return value.

Syntax

Custom_Alloc(Destination,Source,Factor,FactorN,FactorD,
Elimination)

Table 12-18 Syntax of Custom_Alloc Function

Parameter Valid Values

Destination

A valid destination POV that is a valid combination of Account, ICP and Custom 1-4 members.

Source

A valid source POV that is a valid combination of dimension members. Source is the amount that is to be allocated.

Factor

A valid source POV. Factor is the Account used to store the allocation factor.

FactorN

A valid source POV. FactorN is the numerator factor used as the basis for allocation.

FactorD

A valid source POV. FactorD is the denominator factor used as the basis for allocation.

Elimination

A valid source POV. Elimination can be an empty string (""), in which case this parameter is ignored. If the Elimination parameter is set, the amount posted to the Destination POV is multiplied by -1 and posted to the Elimination POV.

Detailed Description

This function allocates a Source POV to a Destination POV using a Factor POV as the basis of allocation, with the option to reverse post the total allocated amount to an Elimination POV. This function is designed for custom dimension allocations.

The Factor parameter stores the result of FactorN divided by FactorD. This is required to enable the factor to refer to entities other than the current entity.

If the entity in the Source POV is a parent, that parent must be consolidated before executing the calculation at the child level. If the parent currency is different from the child currency, then a translation of all relevant currencies must also be run before executing the calculation at the child level.

It is recommended that variables are set in the calling routine and passed to the Custom_Alloc function, which define the Destination, Source, Factor, FactorN, FactorD and Elimination POVs. It is also recommended that the variable names in the calling routine be set to be the same as the Custom_Alloc function.

The Elimination parameter can be an empty string (""), in which case this parameter is ignored. If the Elimination parameter is set, the amount posted to the Destination POV will be multiplied by -1 and posted to the Elimination POV.

Example

The Telephone account is allocated to Products based on a ratio of Products Sales to Total Sales. The inverse of the allocated amount is posted to Allocations account.

Table 12-19 Example of Custom_Alloc Function

Account Jan2014 Feb2014 Mar2014

A#Telephone.C1#[None]

100

300

400

A#Sales.C1#Product1

1000

1000

1000

A#Sales.C1#Product2

1000

2000

3000

A#Sales.C1#TotalProducts

2000

3000

4000

Custom_Alloc(A#Telephone","A#Telephone.C1#[None]", "A#Factor", A#Sales", "A#Sales.C1#TotalProducts", "A#ProductAllocations.C1#[None])

N/A

N/A

N/A

A#Factor.C1#Product1

0.50

0.33

0.25

A#Factor.C1#Product2

0.50

0.66

0.75

A#Telephone.C1#Product1

50

100

100

A#Telephone.C1#Product2

50

200

300

A#ProductAllocations.C1#[None]

-100

-300

-400

The result returned from the CUSTOM_ALLOC function is as follows:

HS.EXP "A#Factor = A#Sales / A#Sales.C1#TotalProducts"
HS.EXP "A#Telephone = A#Telephone.C1#[None] * A#Factor"
HS.EXP "A#Allocations.C1#[None] = (A#Telephone.C1#[None] * -1)" 

Sample Script

This script contains the following information:

  • A sample statement written in the calling routine.

  • Variables set in the calling routine and passed to the Custom_Alloc function.

  • Variable names in the calling routine set to be the same as the Custom_Alloc function.

    Sub Calculate()
    Dim Destination
    Dim Source
    Dim Elimination
    Dim Factor
    Dim FactorN
    Dim FactorD
    Dim C1list
    Dim C1item
    C1list = HS.Custom1.List("Alloc")
    For Each C1item in C1list  
    Source = "A#Telephone.C1#[None]"
    Destination = "A#Telephone.C1#" & C1item
    Factor = "A#Factor.C1#" & C1item
    FactorN = "A#Sales.C1#" & C1item
    FactorD = "A#Sales.C1#TotalProducts"
    Elimination = "A#ProductAllocations.C1#" & C1item 
    Call Custom_Alloc(Destination,Source,Factor,FactorN,
    FactorD,Elimination)
    Next 
    End Sub
    ' Beginning of the Custom_Alloc function 
    Sub Custom_Alloc(Destination,Source,FactorN,FactorD,
    Elimination)
    HS.Clear Factor
    HS.Exp Factor & " = " & FactorN & "/" & FactorD
    HS.EXP Destination & " = " & Source & " * " & Factor 
    If Elimination <> "" Then
    HS.EXP Elimination & " = " & Source & " * -1 * " & Factor
    End If
    End Sub