Conditional Metrics: Filtering data calculations

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

  1. Navigate to the Shared Reports or My Reports folder or to the Search page.

  2. From the icon bar, click the Create Metric icon. This displays the Select a Function or Template dialog box.

  3. From the drop-down list, select Metric Templates.

  4. From the list below, elect Condition, and click OK. This displays the Function Editor.

  5. The function is automatically set to Sum, but you can select a different function from the Aggregation Function drop-down list.

  6. The expression of a metric is what the function is applied to. The expression can be a fact, an attribute, or another metric. Specify the expression by doing one of the following:

    Note: If the Condition area is not already open, expand the Condition option.

Add the condition.

  1. Select the filter or prompt to place on the metric using one of the following methods:

  1. You can determine how the metric condition interacts with the report filter by using the Condition advanced options. The defaults are described below:

    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.

  2. To change these options, click the Condition Advanced Options icon Level Advanced Options dialog box 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

  1. You can add levels or transformations, or save the metric.

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

 

 

_____________________________