Creating a metric that uses a non-grouping function

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.

Non-grouping functions include data mining, date, and rank functions, among other categories. They are the more advanced functions such as Rank, NTile, Moving Average, and AddDays.

When you create a metric that uses a non-grouping function, you define the arguments or parameters for the function:

For example, the Rank of Net Sales metric uses the non-grouping function Rank, which assigns a number to each region's net sales value.

The Rank function uses the following arguments and parameters:

ValueList is a fact or metric representing a list numbers.

ASC is a TRUE/FALSE parameter that indicates the order of ranking (1 is the lowest or highest value).

ByValue is a TRUE/FALSE parameter that indicates whether the ranking is done by integer values (1, 2, 3, 4) or by percentage (10%, 50%, 75%, 100%).

NullInclude is a parameter that determines how NULL values are included in the rank calculation.

BreakBy is the parameter that designates where the calculation should restart.

 

To create a metric that uses a non-grouping function:

  1. If you have not already selected the metric function and opened the Metric Function Editor, complete the following steps:

    1. Open any folder page (for example, click the Shared Folders icon on the home page).

    2. From the icon bar on the left, click the right arrow next to Create Dashboard. A pop-up menu is displayed. Click the New Metric icon. The Select a Function or Template dialog box opens.

    3. Select the non-grouping function (such as Rank or NTile) 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. You can click an object or continue to type.

      • Select 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.  

    1. Click OK to add the function to the metric. The Function Editor opens.

    2. Define the arguments and parameters

    3. To view information about the arguments and parameters for the function, click Details at the bottom of the dialog box.

  2. For each argument listed, type a value or click the Browse icon to find the metric, fact, prompt, or other compatible object to use.

    Arguments are input values of the function. For example, the arguments of the Average function can be the metric to be averaged.

  3. For each parameter listed, type a value or select the option from the drop-down list.

    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 complete the metric:

  1. 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.

  2. 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.

  3. 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.

  4. Click Save to save your changes. The Save As dialog box opens.

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

  6. Click Save to save your changes. The Save As dialog box opens.

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

 

 

_____________________________