Databases Reference
In-Depth Information
Essbase Calc commands and functions
As discussed earlier, database calculations are very important features in the
Essbase world. For some situations, you may need to write complicated calculation
scripts, in other situations, they will be fairly simple. In order for you to become
proficient in writing calculation scripts you need to have an understanding of some
of the predefined commands and functions that can be used in an Essbase database
calculation script. Let's discuss some of the more commonly used commands and
functions in detail.
Data declarations
When you are writing some of the more complex calculation scripts, you will find it
necessary to manipulate the data while calculating. For manipulating the data, you
need to create variables.
In an Essbase calc, you can create temporary variables or global variables (also called
substitution variables, which are discussed in greater detail later in this chapter).
The temporary variables are only available when the calculation script is running
and they do not exist after the calculation script has completed. In order to use these
variables in a calculation script, you need to declare them.
It is always best to declare all of the variables you
will be using at the top of the calculation script.
There are two types of temporary variables that can be used in an Essbase database
calculation scripts:
VAR : A variable containing only one value
ARRAY : A one dimensional array declaration
The allowable naming convention for the VAR and ARRAY variables are similar to one
another, you can use alpha characters "a through z", numbers "0 through 9", and
special characters " $ (dollar sign), # (pound sign), and _ (underscore)". Remember,
you cannot use the & (ampersand) as this is reserved for the substitution variables.
Example:
VAR cRevenue;
or
VAR cRevenue = 10,000;
ARRAY arrCust["TOTAL CUSTOMER"];
 
Search WWH ::




Custom Search