Skip to main content
Version: 2024.12.12

Creating a derived metric using the metric function editor

You can create new metrics, called derived metrics, based on attributes and metrics that have already been added to a dossier.

Note: You can create a new metric by subtracting the values of one metric from the values of another metric, such as Revenue Forecast - Revenue. You can rank a metric's value from least to greatest, or display metric values as percentages of an accumulated total.

To Create a Derived Metric Using the Metric Function Editor

  1. Open the dossier you want to modify.
  2. Create a derived metric and reserve it for future use in a visualization. In the Datasets panel, right-click the metric to use to create a derived metric and choose Create Metric.
  3. In the right pane, enter a name for the metric in the Metric Name field.
  4. To locate a function, enter its name in Search . You can also browse for a function by selecting a function category (that is, Basic Functions, String Functions, etc.) from the drop-down.
    Note: Click on functions in the left pane to view a corresponding description at the bottom of the dialog. Then, click Details to view more information about the function and its arguments in the Functions Reference .
  5. Click a function to add it to the derived metric definition in the right pane.
  6. If you selected an aggregation function (that is, grouping function), such as First, Maximum, or Sum, the Level and Filter fields appear under Function Parameters. Go to step 8.
  7. If you selected a non-aggregation function, such as data mining, date, OLAP, and ranking functions, options appear that allow you to define the input values (that is, arguments) for the function, as well as any parameters that determine the behavior of the function. Enter the appropriate options and go to step 12.
  8. You can define function parameters, such as whether to use all values in the calculation or calculate using only unique values. Click Function Parameters, select the appropriate options to define the parameters, and click OK.
  9. The function is calculated at the level of the attributes on the visualization on which the metric is placed, by default. You can specify the attributes to use in the metric calculation, regardless of what is contained on any visualization that the metric is placed on. To change the level, select an attribute from the Level drop-down. You can also add multiple attributes.
    For instance, if a visualization contains Region and Category, by default the metric calculates regional and category values on that visualization. If you select Region as the level, the metric calculates the regional revenue values on that visualization; it does not include a breakdown by Category. This allows you to compare revenue across regions.
  10. You can add advanced filtering to your metric. Click Add Filter to open the New Qualification dialog.
  11. If the Sort By field appears, select options for sorting the data.
  12. Click Save.

Note: Aggregation and subtotal behavior is automatically determined by default. You can change that behavior, to specify whether the derived metric is calculated using the whole dataset or calculated using the data in the visualization that it is placed on.