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

Creating Custom Calculations198
You use conditional operators in conjunction with If, as in:
If ([Revenue] >= 10000;‘High’;‘Low’)
which returns “High” for all rows where the revenue is greater than or equal to 10000 and
“Low” for all other rows.
Logical operators
Logical operators are used in expressions that return True or False. You use such
expressions in the If function. The Web Intelligence logical operators are AND, OR, NOT,
Between and InList. For example, the expression:
If ([Resort] = ‘Bahamas Beach’ OR [Resort]=’Hawaiian Club’; ‘US’; ‘France’)
returns “US” if the resort is “Bahamas Beach or “Hawiian Club, “France” otherwise.
The expression:
[Resort] = ‘Bahamas Beach’ OR [Resort]=’Hawaiian Club’
returns True or False, True if the Resort variable is equal to ‘Bahamas Beach’ or ‘Hawaiian
Club’, False otherwise.
Context operators
Context operators form part of extended calculation syntax. Extended syntax allows you to
define which dimensions a measure or formula takes into account in a calculation. It is
described in detail in the section ”Defining the calculation context” on page 198.
Function-specific operators
Some Web Intelligence functions can take specific operators as arguments. For example,
the
Previous() function can take the SELF operator.
Defining the calculation context
Before you can define a specific calculation context, you need to understand how
calculation contexts work.
What are calculation contexts?
Calculation contexts give you more control over how a formula or measure is evaluated.
To understand them, you need to be familiar with basic report concepts. A report contains
two kinds of objects: dimensions, which are types of data about your business that can
have measures associated with them (for example: products, years, states) and the
measures that you can calculate in relation to dimensions (for example: sales revenue,
number of sales). For example, a report could show sales revenue (measure) by year
(dimension).
The important thing to remember about measures is that they are semantically dynamic.
This means that the figures returned by a measure depend on the dimensions with which it
is associated; in other words, on the context in which it is placed. Web Intelligence places