HP Storage Essentials Storage Resource Management Report Optimizer Software 6.0 Building Reports Using the Web Intelligence Java Report Panel (August 2008)

Creating custom calculations312
About functions
A custom calculation might consist of report objects only, for example
[Sales Revenue]/[Number of Sales]
However, calculations often include functions as well. A function is an operation that
receives zero or more values as input and returns output based on those values. For
example, the Sum function totals all the values in a measure and outputs the result. The
formula
Sum([Sales Revenue]) outputs a total of sales revenues. In this case, the function input
is the Sales Revenue measure and the output is the total of all Sales Measures.
To find out more about Web Intelligence functions, see ”What is a function?” on
page 337.
About operators
Operators link the various components in a formula. Formulas can contain five kinds of
operators:
Mathematical
Conditional
Logical
Context
Function-specific
You can see all the operators supported by Web Intelligence by clicking on the
Operators tab in the Formula Editor.
The following sections describe each type of operator.
Mathematical operators
Mathematical operators are familiar from everyday arithmetic. There are addition (+),
subtraction (-), multiplication (*), division (/) operators that allow you to perform
mathematical operations in a formula. The formula:
[Sales Revenue] - [Cost of Sales]
Note: contains a mathematical operator, in this case subtraction.
When used with character strings, the ‘+’ operator becomes a string concatenation
operator. That is, it joins character strings. For example, the formula
“John” + “ Smith” returns
‘John Smith.