MicroStrategy ONE
Metric Function Editor
The Metric Function Editor allows you to quickly and easily create and edit a metric, which is a calculation performed against the data in the data warehouse. Metrics represent business measures and key performance indicators, and are similar to formulas in spreadsheet software. A description of the options available to create and edit a metric is provided below. For high-level steps to create a metric, see How to Create a Metric. For steps to edit a metric, see How to Edit a Metric.
If you want to type the metric formula directly, or to create a metric that combines multiple metrics or contains custom expressions, click Use Formula Editor or Switch to Formula Editor, then see Metric Formula Editor for steps.
The options available in the Function Editor vary depending on the type of function that you selected to create your metric in the Introduction to Functions and Template Dialog Box:
- If
you selected a grouping function, such as Sum, Average, First, or
Maximum, the following fields are available:
- Expression: Define the business
data from your data source to use to calculate the metric. The
expression can contain business facts, attributes, or other metrics.
Do one of the following:
- To
specify the expression by typing the name of an object, type
the name of the object in the Expression
field. As you type, matching objects are displayed in a drop-down
list. You can click an object or continue to type. You can
type multiple objects, such as
Revenue-Profit
. - To specify the expression by choosing an object, click the Browse icon . The Select an Object dialog box opens. Either navigate to and select an object, or search for an object.
- To
specify the expression by typing the name of an object, type
the name of the object in the Expression
field. As you type, matching objects are displayed in a drop-down
list. You can click an object or continue to type. You can
type multiple objects, such as
- Level: Define the attribute level at which the metric is evaluated. By default, a metric is calculated at the level of the attributes on the report on which it is placed. Instead, you can specify the attributes to use in the metric calculation, regardless of what is contained on any report the metric is placed on. For detailed steps, see By default, metrics are evaluated at the level of the attributes on the report; this is called the report level. The report level allows the metric calculation to adapt to different reports. You can remove the report level from the metric. If you do this, only the level explicitly set on the metric affects the metric calculation, regardless of the attributes placed on the report. You do not have to remove the report level to add levels to the metric. For a more detailed description of the report level, and the impact of removing it, see the Advanced Reporting Help. Do one of the following:To remove the report level from the metric, click the Delete icon next to Report Level. To add the report level to the metric after it has been deleted, click the Add Report Level icon . .
- Condition: Define a condition to filter which values to include in the metric. For example, a conditional metric can calculate revenue for only the Northeast region. When the metric is placed on a report, the condition is applied to the metric only, and does not affect any other metrics. The metric condition can be either a filter or a prompt that returns a list of filters. Only one filter or prompt can be associated with each metric, but that filter can contain multiple qualifications. For detailed steps to add a condition to the metric, see Add the Condition.
- Transformation: Apply offset values, such as "four months ago", to a metric by defining a transformation. For example, you can compare revenue numbers from this year to last year. For detailed steps to add a transformation to a metric, see Add a transformation.
- Expression: Define the business
data from your data source to use to calculate the metric. The
expression can contain business facts, attributes, or other metrics.
Do one of the following:
- If
you selected a non-grouping function, such as data mining, date, OLAP,
and ranking functions, you 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. To view a list of the arguments and parameters
for the function, click Details
at the bottom of the dialog box.
- For each argument listed, type a value or click the Browse icon to find the metric, fact, prompt, or other compatible object 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.
To access the Function Editor
- Click Create on any page, and select New Metric. The Select a Function or Template dialog box opens.
- In the pane below, select the
function to use to calculate data in the metric. You can narrow the
list of functions displayed in the pane by doing one of the following:
- To search for the function by name, type the function's name in the search field.
- Choose a function category from the drop-down list, such as Math Functions or Financial Functions. The pane is updated to include only the functions that belong to the selected category.
- When you select a function, a description of the function is displayed at the bottom of the dialog box. Click Details to view more information about the function, such as syntax and examples.
- Click Next to add the function to the metric. The Function Editor opens.
Related Topics
How to Create a Metric for steps to create a metric
Level Metrics: How to Modify the Context of Data Calculations for steps to create a level metric
Conditional Metrics: How to Filter Data Calculations for steps to create a conditional metric
Transformation Metrics: Time-Based and Other Comparisons for steps to create a transformation metric
Introduction to Metrics for background information about metrics in general