Strategy ONE
Create 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 document.
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.
- Open an existing document.
- In the Dataset Objects panel, right click a dateset, and select Insert New Metric.
- Click Switch to Function Editor in the bottom pane.
- Enter a name for the metric in the Metric Name field.
-
Select a function from the Functions pane.
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. See Add Conditional Calculations to a Derived Metric Using the If and Case Functions for more information about the If and Case functions.
- Complete the required fields in the right pane.
-
If necessary, 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.
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 necessary, 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.
- To define aggregation and subtotal behavior, click Metric Options in the right pane.
- Enter a name for your new metric attribute in Metric Name.
- Click Save.