MicroStrategy ONE

How to Create a Derived Metric on a Report Using a Function

When you create a derived metric, you can define it using a function, which allows you to create a more complex derived metric. For example, you can choose a RunningSum function to create a RunningSum of Revenue (RunningSum(Revenue)) metric.

To create a derived metric using a function, you select the function, define its arguments and parameters, and then specify the metrics on which to base the new metric.

You can also quickly create a derived metric based on an attribute, by using the Insert Metric feature. For example, Customer is an attribute, and you want to create a metric that counts the number of distinct customers.

Refer to the Functions Reference to learn about the types of functions available in MicroStrategy, what each function calculates, the correct syntax to use for each, and examples.

The steps below show you how to create a derived metric in a report. You can create a derived metric in a document by right-clicking a metric and selecting Insert Function. For details and steps, see the Document Creation Help.

You must have the necessary privileges to add or remove metrics and calculations.

You must have DHTML enabled. See How to Enable DHTML in MicroStrategy Web.

To Create a Derived Metric Using a Function

  1. Click the name of a report to execute it. The report must be in either Grid view or Grid and Graph view.
  2. From the Data menu, select Insert New Metric.

    To quickly create a derived metric based on an attribute, right-click the attribute, point to Insert Metric, and select the function. The derived metric is created, and you can skip the remaining steps of this procedure. Note that if the selected attribute is on the grid, the attribute will be moved to the Report Objects pane.

  3. Define the formula that should appear before the function, if any.
  4. Click the Function Wizard icon Function Wizard icon.
  5. From the Select a category drop-down, select the function to use. When you select a folder, the list of functions in that folder are displayed in the Select a function area.

    Refer to the Functions Reference for information on the types of functions available in MicroStrategy, what each function calculates, the correct syntax to use for each, and examples.

  6. Click OK.
  7. Define the function by entering values for each parameter. The arguments and parameter options that appear differ depending on the function you chose.

Refer to the Functions Reference for information on the correct syntax to use for each function and examples.

Related Topics

Introduction to Derived Metrics