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 341
The If function receives three inputs: a condition that returns true or false, a value to output
if the condition is true and a value to output if the condition is false. For example the
formula
If([Sales Revenue]>2000000;"High Revenue";"Low Revenue")
returns “High Revenue” if the value of [Sales Revenue] is greater than 2000000, “Low
Revenue” otherwise. The condition [Sales Revenue]>2000000 is true in the first case, false
in the second.
What if you want to output three descriptions, “High revenue” (for revenues over
2000000), “Medium revenue” (for revenues between 1500000 and 2000000) and “Low
revenue” (for revenues below 1500000)? In this case you nest If functions. Nesting means
placing one If function inside another. The formula is as follows:
If ([Sales revenue] > 2000000;"High Revenue"; If ([Sales revenue] >= 1500000;"Medium
Revenue";"Low Revenue"))
The outer If function outputs “High Revenue” if the revenue is greater than 2000000. If it is
not, the inner If function then determines whether the revenue is greater than or equal to
1500000 (in which case it outputs “Medium Revenue) or less than 1500000 (in which
case it outputs “Low Revenue”). The result is as follows:
Function reference
For a list of all the functions, operators and keywords available in Web Intelligence,
together with examples of their use, see the Creating and Editing > Adding
Calculations, Alerters and Formulas > Functions section in the Web Intelligence
online help.