Oracle Application Server Discoverer Plus User's Guide 10g (9.0.4) Part Number B10268-01 |
|
This chapter explains how to use Discoverer calculations to answer typical business questions. For example, what are my top three selling products? This chapter contains the following topics:
Calculations are worksheet items based on formulas or expressions (e.g. mathematical formulas, or text handling functions). You use calculations to provide additional analysis to worksheets. In the figure below, the worksheet contains the calculation 'Profit (Sales-Costs)', which calculates the value of sales (i.e. the Sales SUM item) minus the value of costs (i.e. the Cost SUM item).
For example:
Sales SUM * 1.25
UPPER(City)
RANK() OVER(ORDER BY Sales SUM DESC)
Advanced functions such as Rank are known as analytic functions. For more information about analytic functions, see "What are analytic functions?".
Note: Discoverer provides easy-to-use templates for the most popular analytic functions (for more information, see "What analytic function templates are available in Discoverer").
When you have defined calculations, you can use them in worksheets just like other worksheet items. For example, you can:
Worksheets containing this item will display Calendar Year and Department in a single column. For example:
2002 Sales Department
Calculations can be created by the Discoverer manager or Discoverer users. When a worksheet contains calculations, you can:
Calculations are displayed as new columns on worksheets. Calculations can be used in other calculations. Discoverer enables you to use a comprehensive range of pre-defined functions for use in worksheet calculations. Discoverer also provides easy-to-use templates for the most popular analytic functions (for more information, see "What analytic function templates are available in Discoverer" and "Examples of using row-based and time-based intervals").
Analytic functions are advanced mathematical and statistical calculations that you can use to analyze data and make business decisions. For example, these functions can answer questions such as:
Note: Analytic functions are a subset of the SQL functions available in the Oracle database.
In the example below, the Rank Sales item contains an analytic function that calculates the league table position of Cities according to sales performance. Using the Rank Sales column, you can see that New York is ranked number 1 with total sales of $85,974.23.
You can create analytic functions in the following ways:
Note: Discoverer provides easy-to-use templates for the most popular analytic functions (for more information, see "What analytic function templates are available in Discoverer").
Discoverer Plus provides easy-to-use templates for the most popular analytic functions. These templates enable you to perform complex business intelligence analysis quickly and easily.
Note: For examples of analytic functions created using templates, see "Examples of using row-based and time-based intervals".
Discoverer provides templates for the following types of analysis:
When a worksheet contains calculations, you can display or hide the calculations. You display calculations on a worksheet when you want to use them to analyze worksheet data. You hide calculations on a worksheet when you do not need to use them to analyze worksheet data. For example, you might display a calculation when you export a worksheet.
To display or hide calculations:
The "Edit Worksheet dialog: Calculations tab" shows calculations available to the worksheet. The check box beside each item indicates whether it is displayed on the worksheet.
For example, choose Active Only to display those calculations that are currently displayed on the worksheet.
Discoverer displays and hides the calculations that you specified.
You create calculations to analyze a worksheet in a new way. For example:
Note: Discoverer provides easy-to-use templates for the most popular analytic functions (for more information, see "What analytic function templates are available in Discoverer").
To create a calculation:
Hint: Use a short descriptive name, which will be displayed on the worksheet.
If you are familiar with calculation syntax, you can type the formula in the Calculation field.
Note: If you type a formula in the Calculation field, you must prefix the formula with an equals sign (i.e. =).
If you prefer, you can build the calculation in stages using any of the following methods:
Hint: Before pasting items in the Calculation field, position the cursor in the Calculation field to where you want to insert the item.
Note: Calculations follow the standard Oracle calculation syntax. For a full description of this syntax, see the Oracle9i SQL Language Reference Manual.
Discoverer displays the calculation that you created in the calculation list.
Discoverer displays the new calculation as a column on the worksheet.
For a full list of Show options, see "New Calculation dialog".
Discoverer provides easy-to-use templates for the most popular analytic functions (for more information, see "What analytic function templates are available in Discoverer"). You use templates to build analytic functions that help you analyze data in powerful ways and make business decisions quickly and easily. For example, you might want to calculate the league table position (i.e. rank) of sales outlets based on sales.
You use a template to create an analytic function formula, which is inserted into the definition of a new or existing Discoverer calculation.
To create a new calculation using an analytic function template:
Hint: Use a short descriptive name, which will be displayed on the worksheet.
For example, if you choose the Rank template, you will use the "Rank dialog" to create the formula.
The underlying SQL statement for the analytic function formula is displayed in the Calculation field at the bottom of the template.
The SQL statement for the analytic function that you created is transferred to the Calculation field. You might want to modify the SQL statement for the analytic function (e.g. by adding more ORDER BY clauses) or by inserting another function into the Calculation field.
The Calculation field displays the underlying SQL statement for the analytic function that you defined.
Note: You can subsequently modify the calculation (e.g. to add more PARTITION BY clauses) in any of the following ways:
Note: If you have more than one functions in the Calculation field, you must associate the functions (e.g. using + or -).
Discoverer displays the calculation that you created in the calculation list.
Discoverer displays the new calculation as a column on the worksheet.
For example, you might create a Band by rank formula based on the Profit SUM item (e.g. NTILE(4) OVER (ORDER BY Profit SUM DESC). If you want end users to select the number of bands at runtime, you might create a worksheet parameter called Band number. To use the Band number in the Band by rank formula you must manually change the formula to:
NTILE(:Band number) OVER (ORDER BY Profit SUM DESC)
You edit calculations to change the way that they behave. For example, to change a percentage increase calculation from 25% to 30%.
To edit a calculation:
For example:
Note: If you have more than one functions in the Calculation field, you must associate the functions (e.g. using + or -).
Discoverer updates the calculation as specified.
You delete a calculation when you no longer need it and want to remove it permanently from a worksheet. For example, you might have created a temporary calculation to answer a question from a colleague. After printing the report, you want to remove the calculation from the worksheet.
To delete a calculation:
Discoverer removes the calculation that you specified.
For examples of different types of calculation, refer to:
|
![]() Copyright © 1999, 2003 Oracle Corporation. All Rights Reserved. | | Ad Choices. |
|