Technical data

Using Built-in Functio ns in Analytic Models Chapter 11
Parameters
Parameter Description
Dimension The dimensio
ntotest.
Returns
The FIRST function returns the first detail member regardless if the detail m ember is created out of a tree that
is attached to the dimension. The FIRST function also returns True if the first member of Dimension is being
calculated; otherwise, it returns False.
FOR
Syntax
FOR(Index, Start, Finish, Loop B ody)
Description
The FOR function loops through a series of values.
Parameters
Parameter Descriptio
n
Index The name of
the variable that h olds the index number.
Start The index value at which to start the loop.
Finish The index
value at which to finish the loop.
Loop Body The action to take at the current index.
Example
The foll
owing formula raises a base to an integral exponent without using the ^ operator:
IF(EXPO
NENT <> TRUNC(EXPONENT), RETURN(0.0));
SET(&Result, 1);
FOR(&Index, 1, ABS(EXPONENT),
SET(&Re
sult, &Result * BASE)
);
IF(EXPONENT >= 0, &Result, 1 / &Result)
In this formula, the FOR function sets the specified variable to each value at the beginning of the loop,
countingupifFinish is greater than Start, and counting down if Start is greater than Finish.
FORCHILDREN
Syntax
FORCHILDREN(Dimension, Expression,{#DIRECT/#ALL/#DETAILS,{Parent Member}})
156 Copyright © 1988-2007, Oracl e. All rights reserved.