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:
Select the function. The function is the calculation applied to the data. Functions include rank, percent to total, moving total, running total, and more.
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:
Adding, subtracting, multiplying, or dividing existing metrics. See Creating a derived metric by combining the values of metrics.
Selecting how to aggregate an existing metric. See Creating a derived metric by selecting the aggregation function.
Basing the metric on an attribute. See Creating a derived metric from an attribute.
If the attribute contains numeric values, the values of the metric are calculated based on the sum of elements in the attribute.
If the attribute does not contain numeric values, the metric is created as a count metric.
Typing the metric formula directly, using custom expressions, and adding conditional calculations to create more sophisticated metrics to meet your needs. See Metric Expression Editor for derived metrics.
You have already created the visualization to add the derived metric to. For steps, see About visualizations. If you want to create and add a basic derived metric to a dashboard without adding it to a specific visualization, use the Metric Editor, as described in To create a basic derived metric on the dashboard.
You must have Edit Dashboard and Run Dashboard privileges.
To create a basic derived metric on a visualization:
Click the name of the dashboard to run it.
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.
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.
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.
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:
Click the name of the dashboard to run it.
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:
Click Switch to Function Editor.
Type a name for the metric in the Metric Name field.
From the Functions list on the left, browse to and select the function to use to create the derived metric.
To search for a function, type a function name in the search field.
To search for a function, type a function name in the search field.
To view a description of a function, hover your cursor over the function.
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.
If you selected an aggregation function (also referred to as a grouping function), such as Sum, First, or Maximum, the Level field is displayed. Perform the following steps:
Select the metric to group, in the second drop-down list.
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.
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.
If you selected a non-aggregation function, such as data mining, date, and ranking functions, you are presented with options to define the input values (called arguments) for the function, as well as any parameters you can use 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. Perform the following steps:
For each argument listed, type a value to use as input values of the function.
For each parameter listed, type a value or select the parameter value from the drop-down list.
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.
Click Save. The new metric is added to the dashboard.
Editing or deleting derived metrics in a dashboard
Metric Function Editor for derived metrics in dashboards
Metric Expression Editor for derived metrics in dashboards
_____________________________
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Legal Notices