Metric Formula Editor

Metrics are objects that represent business measures and key performance indicators. From a practical perspective, metrics are the calculations performed on data stored in your database, the results of which are displayed on a report. Metrics are similar to formulas in spreadsheet software. For a brief overview of metrics, see About Metrics.

The Metric Formula Editor allows you to:

The metric formula determines the data to be used from your data source and the calculations to be performed on that data. An example of the formula of a metric is Sum(Line Void Count), where Line Void Count is a fact stored in the data source. This metric formula calculates the sum of line voids recorded in the data source to determine a statistical measure of line voids for stores, cashiers, etc.

A metric formula can also look like Rank<ASC=False, ByValue=True, BreakBy={[Region]}>([Net Sales]). This metric ranks net sales values (from the Net Sales metric) within regions. The highest net sales is ranked as 1. The Rank function is a non-grouping function.

 

To create a metric using the Formula Editor:

  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. Click Switch to Formula Editor. This displays the Formula Editor.

  4. You can type the metric expression, if you are experienced with metrics and know the metric expression. As you type, matching objects are displayed in a drop-down list. In the list, you can click an object to select it, or click Browse to browse for the object. You can also continue typing the expression.

  5. To select a function, complete the following steps:

    1. Click Insert Function Insert Function icon. The Select a Function or Template dialog box opens.

    2. Do one of the following:

    1.  
    2. If you know the function that you want to use, begin typing the function name in the field. As you type, matching objects are displayed in the Search Result list. You can click an object to select it, or continue to type the name.

    3. To browse through functions to find the one that you want, from the Select a category drop-down list, select All Functions. All the functions are listed alphabetically in the list. (To reduce the number of functions displayed, you can select a function category instead.)

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.

  1. Select the function to use, then click OK.

  2. If you selected a grouping function (such as Sum or Average), the function requires an expression (the data to be used). Optionally, you can add levels, a condition, and transformations. The Function Editor opens. After you specify the expression, click Insert. You are returned to the Formula Editor.

    Specify the expression by doing one of the following:

  3. If you selected a non-grouping function (such as Rank or Moving Average), the function requires arguments and/or parameters. The dialog box for the function opens. To view information about the arguments and parameters for the function, click Details at the bottom of the dialog box. Click Insert when you have specified the arguments and parameters. You are returned to the Formula Editor.

To add a logical operator, complete the following steps:

  1. Click Insert Function Insert Function icon. The Select a Function or Template dialog box opens.

  2. From the Select a category drop-down list, select point to Logical Operators, and select either IF or NOT. The dialog box for the logical operator opens.

  3. For each argument listed, type a value or click the Browse icon to find the metric, fact, prompt, or other compatible object to use. As you type, matching objects are displayed in a list. You can select an object or continue to type.

    For a description of each argument, click Details.

  4. After you have defined all the arguments, click Insert. You are returned to the Formula Editor.

To delete the metric formula and begin again, click Clear Content Clear Content icon.

 

Validate the metric formula

When you have completed the metric formula, click the Syntax Validation icon Syntax Validation icon. The Formula Editor displays a status message, at the bottom of the metric expression, indicating whether or not the new metric expression is correct. When the message displays as Valid Metric Formula, the metric expression is correct.

 

Complete the metric

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

 

 

_____________________________