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

Building Reports Using the Web Intelligence Java Report Panel 307
20
Creating custom calculations
Overview
Custom calculations allow you to add additional calculations to your report beyond its
base objects and the standard calculations provided by Web Intelligence.
You add a custom calculation by writing a formula that Web Intelligence evaluates when
you run the report. A formula can consist of base report variables, functions, operators and
calculation contexts.
This chapter describes:
creating formulas
functions
operators
defining calculation contexts in formulas
examples of useful formulas
Example: Showing average revenue per sale
If you have a report with Sales Revenue and Number Sold objects and you want to add
revenue per sale to the report. The calculation
[Sales Revenue]/[Number Sold]
gives this value by dividing the revenue by the number of items sold in order to give the
revenue per item.
A custom calculation is a formula that can consist of report objects, functions and
operators. Formulas have a calculation context that you can specify explicitly if you
choose.
For information on formulas, see ”Creating formulas” on page 307. For information an
operators, see ”Examples of useful formulas” on page 333. For information on calculation
contexts, see ”Defining the calculation context” on page 314.
Creating formulas
This section describes the ways in which you can create formulas in your reports. You can
add formulas in Structure View in two ways:
by typing or dragging and dropping the formula components into the Formula toolbar
by using the Formula Editor to build the formula