Metrics are calculations performed against the data in the data warehouse. Metrics represent business measures and key performance indicators. For a brief overview of metrics, see About metrics.
The easiest way to create a metric is to use a metric template. A metric template helps you create certain types of metrics. For steps, see Creating a metric using a template below.
You can also create a metric from scratch. You can apply levels, conditions, and transformations, or any combination. You can use grouping functions (such as Sum and Average) or non-grouping functions (such as Rank and NTile). To do this, you use the Function Editor, which helps guide you through the process. For steps, see Creating a metric from scratch below.
A more advanced user can create the metric by typing the metric formula. To do this, you use the Formula Editor, which also allows you to create a compound metric (which combines multiple metrics, such as Net Sales - Profit) and build custom expressions such as percent-to-total. For steps, see Metric Formula Editor.
Depending on the template that you select, certain components are predefined, while you must define others. Before you save the metric, you must ensure that the following components are defined:
Function: The calculation applied to the data
Expression: The business data from your data source
For example, the Condition template allows you to create a conditional metric, which is a metric with a filter (also known as a condition). A conditional metric allows you to apply a filter to only one metric on a report while not affecting the other metrics. The Condition template automatically selects Sum as the metric's function, and also opens the Condition area so that you can quickly select the filter to apply to the metric. You only have to select which fact to sum (this is the metric expression), as well as the filter, to create the metric. You can of course change the metric function, rather than accepting the default of Sum.
To create a metric using a template:
Navigate to the Shared Reports or My Reports folder or to the Search page.
From the icon bar, click the Create Metric icon. This displays the Select a Function or Template dialog box.
From the drop-down list, select Metric Templates.
From the list, select the metric template to use.
Click OK. This displays the Function Editor.
Depending on the template that you selected, certain components are predefined. You must define the following components before you can save the metric:
Function: The calculation applied to the data
Expression: The business data from your data source
Click Save to save your changes. This displays the Save As dialog box.
Navigate to the folder where you want to save the metric. Enter a Name and Description for the metric, and click OK. Your new metric is saved, and you are returned to the Function Editor.
When you create a metric, you select the mathematical function. You then define the following information, depending on the type of function that you selected:
If the selected function is a simple grouping function, you create the metric expression, which is the data that the function works on. Examples of simple grouping functions are Sum, Average, First, and Maximum. You can also add levels, conditions, and transformations to the metric.
Level: By default, metrics are evaluated at the level of the attributes on the report; this is called the report level. For example, a net sales metric is set to the report level by default. When this metric is placed on a report containing Region, the metric calculates regional net sales. When it is placed on a report containing Customer, the net sales is calculated for each customer. You can set the level within the metric, allowing you to specify the attribute to use in the metric calculation, regardless of what is contained on any report the metric is placed on. For a more detailed description, including examples and the elements of a metric level, see Level metrics: Modifying the context of data calculations.
Condition: A condition is a metric filter that is independent of the filters on any reports the metric is used in. A conditional metric allows you to apply a filter to only one metric on a report while not affecting the other metrics. The metric condition can be either a filter or a prompt that returns a list of filters. Only one filter or prompt can be associated with each metric, but that filter can contain multiple qualifications. For example, a conditional metric can calculate net sales for only the Northeast region. When placed on a report with Item, the net sales amount is displayed for only Northeast for each of the items. For a more detailed description, including examples, see Conditional metrics: Filtering data calculations.
Transformation: Transformations allow you to apply an attribute-element offset for fact-comparison purposes. Although transformations can be applied to any attribute hierarchy, the Time hierarchy is used most often. For the Time hierarchy, the difference can be set as a fixed number of days, weeks, months or years. For example, a transformation metric can calculate last year's net sales. In 2012, that displays 2011 net sales, but in 2011 that displays 2010 net sales. For a more detailed description, including an example, see Transformation metrics: Time-based and other comparisons.
If the selected function is not a grouping function, you define the arguments or parameters. Non-grouping functions include data mining, date, and rank functions, such as Rank, NTile, Moving Average, and AddDays.
Arguments are the input values of a function. For example, the arguments of the Average function can be the metric to be averaged.
Parameters allow you to determine the behavior of the function. For example, the NTile function has two parameters, Ascending and Tiles. Ascending controls whether the NTiles are ordered in ascending or descending order, while Tiles sets the number of splits.
To create a metric from scratch:
The steps listed below provide a high-level outline to creating a metric from scratch. Before you begin, you should know what you want the metric to calculate, and the type of function to use.
Navigate to the Shared Reports or My Reports folder or to the Search page.
From the icon bar, click the Create Metric icon. This displays the Select a Function or Template dialog box.
Select a function by doing one of the following:
Type the function name in the field below Select a Function or Template. As you type, matching objects are displayed in the bottom list. You can click an object or continue to type.
Choose the function from the Select a category drop-down list.
When you select a function, a description of the function is displayed at the bottom of the interface. Click Details to view more information, such as syntax and examples.
Click OK to add the function to the metric. The Function Editor opens.
If you selected a grouping function, the Function Editor allows you to define the expression, level, condition, and transformation. For steps, see Creating a metric that uses a grouping function.
If you selected a non-grouping function, the Function Editor allows you to define the arguments and parameters. For steps, see Creating a metric that uses a non-grouping function.
You can format the metric header and the metric values. Formatting includes how numeric values are displayed, font styles and sizes, and cell display colors. This formatting is used for the particular metric, regardless of the report on which it is placed. For steps, see Format Metric dialog box.
You can select the functions that can be used to total the metric on a report. For steps, see Advanced Metric Options dialog box: Subtotals.
You can select the function used for dynamic aggregation, which is the rollup of metric values that occurs when an attribute is moved from the report grid to the Report Objects. For steps, see Advanced Metric Options dialog box: General.
Click Save to save your changes. This displays the Save As dialog box.
Navigate to the folder where you want to save the metric. Type a Name and Description for the metric, and click OK. Your new metric is saved, and you are returned to the Function Editor.
Related topics
About metrics for a brief overview of metrics
Format Metric dialog box for steps to format a metric
Advanced Metric Options dialog box for descriptions of advanced metric settings, such as dynamic aggregation and subtotal functions, VLDB properties, metric aliases, and the metric join type
_____________________________
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Legal Notices