Creating a metric based on existing objects: Derived metrics

You can create a new metric while you are viewing a dashboard. For example, you can subtract the values of one metric from the values of another metric, such as Revenue Forecast - Revenue. You can calculate a monthly average, for example, Yearly Profit / 12. If a dashboard shows the dollar sales for a particular region, you can create a derived metric to view the same data in millions, defined as Dollar Sales / 1,000,000.

Derived metrics are metrics that you can create based on existing objects on the dashboard. A derived metric performs a calculation on the fly with the data available on a dashboard, without re-executing the dashboard against the data source. Derived metrics are saved and displayed only on the specific dashboard on which they are created. You can only use objects already existing in a dashboard to create a derived metric. If the derived metric requires data that is not available in the Datasets panel, the dataset must be updated and resaved before the new data is displayed. For a more detailed description of derived metrics, see About derived metrics.

Derived metrics calculate subtotals and dynamic aggregation both for functions that have a default dynamic aggregation (such as sum or minimum) and for functions that do not have a default dynamic aggregation (such as average and count distinct).

The following high-level steps describe how to create a basic derived metric:

  1. Select the function. The function is the calculation applied to the data. Functions include rank, percent to total, moving total, running total, and more.

  2. Select parameters and input values to define the function.

For example, if you are creating a rank metric, select whether to display the metric values in ascending or descending order. Next, you select how to break the ranking data. Breaking the rank calculation restarts the ranking calculation. For instance, you can select an attribute, and the total is restarted for each element in the attribute.

For detailed steps to create a basic derived metric and immediately display it on a visualization, see To create a basic derived metric on a visualization. You can also create and add a basic derived metric to a dashboard without adding it to a specific visualization, by using the Metric Editor. For steps, see To create a basic derived metric on the dashboard. Both methods add the derived metric to the list of dataset objects in the dashboard's Datasets panel, so that you can use the metric in visualizations, text fields, and so on.

You can also create a derived metric by:

Prerequisites

To create a basic derived metric on a visualization:

  1. Click the name of the dashboard to run it.

  2. From the visualization’s Editor panel, right-click the metric to use to create the derived metric, point to Shortcut Metric, and select the function, such as Running Total, Rank, or Percent Change.

  3. If the function that you want to use is not listed, click More Functions. The Metric Editor opens. To continue creating the derived metric, see To select and define the function.

  4. Select the appropriate options to define the derived metric.

    For example, if you are creating a running total, select the function to use for the calculation, such as Sum to calculate a running sum or Average for a running average. Then, select how to break the running total. Breaking the running total restarts the total. For instance, you can select an attribute, and the total is restarted for each element in the attribute.

  5. Click OK. The new metric is added to the visualization. The derived metric is also added to the dashboard, in the Datasets panel, so that you can use it in other objects on the dashboard.

To create a basic derived metric on the dashboard:

  1. Click the name of the dashboard to run it.

  2. On the Datasets panel, right-click the metric to use to create the derived metric, and select New Metric. The Metric Editor opens.

To select and define the function:

  1. Click Switch to Function Editor.

  2. Type a name for the metric in the Metric Name field.

  3. From the Functions list on the left, browse to and select the function to use to create the derived metric.

  1. In the pane to the right, select the appropriate options to define the function, as described below. To view more details about the function, including descriptions of the options and examples, click Details at the bottom of the interface.

  1. Select the metric to group, in the second drop-down list.

  2. If the function requires any parameters, they are listed. Select the appropriate options to define each parameter, then click OK to apply your changes. For an explanation of a function parameter, click the Information icon next to the parameter.

  3. By default, the function is calculated at the level of the attributes on the visualization on which the metric is placed. You can specify an attribute to use as the level, by selecting the attribute from the Level drop-down list.

    For example, 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.

  1. For each argument listed, type a value to use as input values of the function.

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

  1. By default, the aggregation and subtotal behavior is automatically determined. You can change the 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. For an explanation of when you need to change the behavior, and steps to do so, see Changing the aggregation and subtotal behavior for a derived metric.

  2. Click Save. The new metric is added to the dashboard.

Related topics

Editing or deleting derived metrics in a dashboard

Metric Function Editor for derived metrics in dashboards

Metric Expression Editor for derived metrics in dashboards

 

 

_____________________________