Level Metrics: Modifying the context of data calculations

Prerequisite

You must understand aggregating or calculating data at various levels of the business concepts related to a report’s results.

About level metrics

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 on which the metric is placed.

Level metrics are useful for determining the contribution of one object to the whole.

How can you calculate at two different levels in the same metric? The answer is a level metric, which allows you to specify how the metric is calculated.

For example, the Refund Count-Cashier Pct of Store metric divides the Refund Count metric by a metric called Refund Count for Store. The Refund Count metric is calculated at the report level, in this case, for each cashier. A different number is calculated for each row of the report. In contrast, the level of the Refund Count for Store metric has been set to store, which means that it reflects the refund count for the store. The same number is calculated for each cashier in the same store.

The level is indicated between the curly braces ({ }) in the metric definition shown below:

Sum([Refund Count]) {~, Store}

The tilde (~) indicates that the report level is still part of the metric level.

Note: Since level metrics are a complex subject, they are only briefly described in this topic.

Report level: the default level

By default, a metric is calculated at the report level, meaning that the lowest attributes on the report dictate how the metric is aggregated. For example, if a report contains Refund Count by Store and Cashier, the numbers are calculated to reflect cashier level data.

Note: The concepts underlying the term level in the context of metrics are interchangeable with those of dimensionality. The term level is used throughout the documentation.

 

To add a level to a metric:

Prerequisite

The following procedure creates a level metric by using the Level metric template, which allows you to quickly and easily begin creating the metric. The Level template uses the Sum function and opens the Level area so that you can quickly define the level to apply to the metric. You only have to select which fact to sum as well as the level to create the metric.

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 level 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 Remove the report level (optional).

  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, select Level, and click Next. This displays the Function Editor. The Aggregation Function defaults to Sum. You can keep this selection, or make a different one from the list.

  5. 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:

    Remove the report level (optional)

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

  6. By default, metrics are evaluated at the level of the attributes on the report; this is called the report level. The report level allows the metric calculation to adapt to different reports. You can remove the report level from the metric. If you do this, only the level explicitly set on the metric affects the metric calculation, regardless of the attributes placed on the report. You do not have to remove the report level to add levels to the metric.

    Add a new level

  7. To determine the target, which is the attribute level at which the metric is calculated, click Browse icon. The Select an Object dialog box opens. Select the target. You are returned to the Function Editor.

    Note: The target can be an attribute or a hierarchy. Using a hierarchy allows the level metric to dynamically adapt to the report. When placed on a report with attributes from that hierarchy, the metric calculates at the level of the lowest attribute of that hierarchy.

  8. Click the Level Options icon Level Options icon next to the target that you added. This displays the Level Options dialog box.

  9. By default, the metric calculates only for the elements found in the filter definition (standard relationship with the report filter). To change how the report filter interacts with the metric calculation, select one of the following Relationship with Report Filter options:

  10. By default, the metric aggregates by grouping by the target attribute (standard metric aggregation). To change the aggregation element, select one of the following Metric Aggregations options:

  11. Click OK to save your changes. You are returned to the Function Editor.

  12. You can add more levels to the metric, if needed. Repeat the steps above, beginning at To add a new level.

    Complete the metric

  13. By default, the metric filter is applied to the metric calculation. For a description of this option and steps to change it, see Level Advanced Options dialog box.

  14. You can add a condition or transformations, or save the metric.

Related topics

Level Options dialog box for descriptions of the level filtering and aggregations options

Level Advanced Options dialog box for descriptions of the metric filter and metric calculation interaction

Creating a metric that uses a grouping function

About metrics for background information about metrics in general

 

 

_____________________________