You can think of conditionality as 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.
Note: The terms metric filter and metric condition are used interchangeably to refer to the filter in a conditional metric.
The following report includes a simple example of a conditional metric, to quickly show you what a conditional metric is in its most basic form. In this example, you need to review regional net sales for different items. You can create a report containing Item, the Net Sales metric, and conditional metrics for the regions. In the following report sample, the Northeast Net Sales and Mid-Atlantic Net Sales metrics are conditional metrics. Northeast Net Sales uses the same formula as the Net Sales metric, with a filter for the Northeast region. The Mid-Atlantic Net Sales metric was created in the same way.
Conditional metrics can help you create more sophisticated analyses than the simple report above. For example, a conditional metric can contain multiple qualifications or a level.
To add a condition to a metric:
Prerequisites
You apply a filter or prompt to a metric to set metric conditionality. If the filter or prompt that you need does not exist, you must create it before adding it to the metric. See About filters or About prompts.
The following procedure creates a conditional metric by using the Condition metric template, which allows you to quickly and easily begin creating the metric. The Condition template uses the Sum function and opens the Condition area so that you can quickly define the condition to apply to the metric. You only have to select which fact to sum, as well as the condition, to create the metric.
Note: You can instead create the metric by defining the metric's formula (the function and expression) yourself. The metric must use a grouping function (such as Sum or Average) to have a condition added to it. For steps to create a metric that uses a grouping function, see Creating a metric that uses a grouping function. If you have already defined the metric formula, begin this procedure at Add the condition.
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 below, elect Condition, and click OK. This displays the Function Editor.
The function is automatically set to Sum, but you can select a different function from the Aggregation Function drop-down list.
To specify the expression by typing the name of a object, type the name of the object in the Expression field. As you type, matching objects are displayed in a drop-down list. You can click an object or continue to type. You can type multiple objects, such as Net Sales-Refund Amount.
To specify the expression by choosing an object, click the Browse icon . This displays the Select an Object dialog box. Either navigate to and select an object, or search for an object.
Note: If the Condition area is not already open, expand the Condition option.
Select the filter or prompt to place on the metric using one of the following methods:
To type an object, begin typing the name of the object in the Condition field. As you type, matching objects are displayed in a drop-down list. You can click an object or continue to type.
To choose an object, click the Browse icon next to the Condition field. This displays the Select an Object dialog box. Either navigate to and select an object, or search for an object.
You can determine how the metric condition interacts with the report filter by using the Condition advanced options. The defaults are described below:
The report filter is applied to the data and then the metric filter is applied to those results. You can change the interaction between the report and metric.
The parts of the report filter that are related to parts of the metric condition are removed. You can instead apply report conditions to a conditional metric.
Note: The report/metric filter interaction is relevant only if at least one filter contains a metric set qualification, relationship qualification, or shortcut-to-a-report qualification. The results from these types of qualifications can vary. For example, filtering on "country=US" always yields the same results. This is an example of an attribute form qualification. However, filtering on "country where net sales is greater than $1000" can return different results if the data is for 2002 only, 2003 only, or both years combined. This is a metric qualification.
To change these options, click the Condition Advanced Options icon next to the Condition field. This displays the Condition Advanced Options dialog box. For examples of these options and steps to change them, see Condition Advanced Options dialog box.
Complete the metric
You can add levels or transformations, or save the metric.
For steps to add levels, see To add a level to a metric. A level allows you to specify the attributes to use in the metric calculation, regardless of what is contained on any report the metric is placed on. By default, a metric is calculated at the level of the attributes on the report. For a more detailed description of levels, including examples, see Level metrics.
For steps to add transformations, see To add a transformation to a metric. A transformation is an attribute-element offset for fact-comparison purposes. For example, a transformation metric can help a user compare last month's net sales to this month's net sales. For a more detailed description of transformation metrics, including examples, see Transformation metrics.
To save the metric, click Save to save your changes. The Save As dialog box opens. 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
Condition Advanced Options dialog box for descriptions of the report/metric filter interaction and related report filter elements options
Creating a metric that uses a grouping function
About metrics for background information about metrics in general
_____________________________
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Legal Notices