MicroStrategy ONE

Creating metrics to use additional attribute forms as inputs for predictive metrics

If attributes include additional attribute forms other than their ID form that are to be used as inputs for predictive metrics, you can create metrics based on these attribute forms. The resulting metric can then be used as an input for a predictive metric, thus allowing the attribute information to be included in a predictive metric.

The steps below show you how to create a metric based on an attribute form. The resulting metric, which contains the attribute information, can then be used to create a predictive metric.

Before you begin

This topic assumes you know how to create a metric. For steps, see Creating metrics in reports.

To create metrics to use additional attribute forms as inputs for predictive metrics

  1. In MicroStrategy Developer, open the Metric Editor. (How? )

  2. All metric expressions must have an aggregation function. To support including attribute information in the metric expression, in the Definition area, type Max() to use the Max aggregation function.

  3. In the Object Browser, select the attribute on which to base the metric. Drag and drop the attribute within the parentheses of the Max() aggregation function. The attribute is placed in the metric expression, inside an aggregation function.

  4. Specify the desired attribute form using the AttributeName@FormName format, where:

    • AttributeName: Is the name of the attribute. If there are spaces in the attribute name, you can enclose the attribute name in square brackets ([]).

    • FormName: Is the name of the attribute form. Be aware that this is different than the attribute form category. If there are spaces in the attribute form name, you can enclose the attribute name in square brackets ([]).

    • For example, in the image shown below the Discount form of the Promotion attribute is included in the metric.

  5. If the predictive metric is to be used to forecast values for elements that do not exist in your project, you must define the join type for the metric used as an input for the predictive metric to be an outer join. For example, the predictive metric is planned to forecast values for one year in the future. Since this future year is not represented in the project, you must define the join type for the metric used as an input for the predictive metric to be an outer join so that values are returned.

    To set the join type to outer to include all data in the dataset:

    • From the Tools menu, select Advanced Settings, and then Formula Join Type. The Metric Formula Join Type dialog box opens.

    • Select Outer and click OK.

  6. If you plan to export predictive metric results to a third-party tool, you should define the column alias for the metric used as an input for the predictive metric. This ensures that the name of the metric used as an input for the predictive metric can be viewed when viewing the exported results in the third-party tool.

    To create a metric column alias to ensure the column name matches the metric's name:

    • From the Tools menu, select Advanced Settings, and then Metric Column Options. The Metric Column Alias Options dialog box opens.

    • In the Column Name field, enter the name of the metric. This must be a valid column name for your database (for example, usually no spaces or special characters can be included).

    • Click OK.

  7. Save the new metric.

    It is best when the column name matches the metric name so that the predictive metric can be automatically created when you import the predictive model. If the names do not match an existing metric when the predictive model is imported into MicroStrategy, the user will be prompted to manually identify the proper metric to use.

  8. You can now include the metric in a training metric to create a predictive metric, as described in Training Metric Wizard.