Units_Rates

This function calculates the product of two source POVs (C = A * B).

Return Value

No return value.

Syntax

Units_Rates(Destination,Units,Rates)

Table 12-25 Syntax of Units_Rates Function

Parameter Valid Values

Destination

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

Units

A valid source POV that is a valid combination of dimension members.

Rates

A valid source POV.

Detailed Description

This function calculates the product of two source POVs (C = A * B). As a best practice, it is recommended that variables are set in the calling routine and passed to the Units_Rates function, which define the Destination, Units and Rates POVs. It is also recommended that the variable names in the calling routine are set to be the same as the Units_Rates function.

Example

The Sales account will return the value of UnitsSold * Price.

Table 12-26 Example of Units Sold Function

Account Jan2014 Feb2014 Mar2014

A#UnitsSold

1000

2000

5000

A#Price

1.25

1.00

0.50

Units_Rates("A#UnitsSold",A#Price)

1250

2000

2500

The result returned from the UNITS_RATES function is as follows:

HS.EXP "A#Sales = A#UnitsSold * A#Price"

Sample Script

The script contains the following information:

  • A sample statement written in the calling routine.

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

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

    Sub Calculate()
    Dim Destination
    Dim Units      
    Dim Rates      
    Destination = "A#Sales"
    Units = "A#UnitsSold"
    Rates = "A#Price"
    Call Units_Rates(Destination,Units,Rates)
    End Sub
    ' Beginning of the Units_Rates function
    Sub Units_Rates(Destination,Units,Rates)
    HS.EXP Destination & " = " & Units & " * " & Rates
    End Sub