HP Storage Essentials Storage Resource Management Report Optimizer Software 6.0 Performing On-Report Analysis with Web Intelligence (August 2008)

Creating Custom Calculations196
1. Select the cell on the report where you want to include the formula.
You can select a table cell or a free-standing cell.
2. Display the Formula toolbar by clicking View > Toolbars > Formula on the Main
menu
3. Click the Formula Editor button on the Formula toolbar.
4. Build the formula by double-clicking objects, functions and operators to add them to the
Formula box.
NOTE: When you add a function by double clicking, Web Intelligence places the
cursor between the function parentheses to make it easier for you to continue
building your formula. For example, to create the formula
Average([Revenue]),
double-click the Average function, then double-click the Revenue object.
Including text in cells
The text in report cells always begins with ‘=’ . Literal text appears in quotation marks,
while formulas appear without quotation marks. For example, the formula
Average([Revenue]) appears in a cell as:
=Average([Revenue])
The text “Average Revenue” appears as:
=”Average Revenue”
You can use text alone in a cell, or mix formulas and text by using the ‘+’ operator. If you
want a cell to display the average revenue preceded by the text “Average Revenue, the
cell text is as follows:
=”Average Revenue: ” + Average([Revenue])
Note the space at the end of the text string so that the text and the value are not placed
directly side-by-side in the cell.
Saving formulas as variables
You can save a formula as a variable in order to re-use it throughout a report. For
information on how to do this, see ”Saving formulas as variables” on page 221.
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.