MicroStrategy ONE

Level metrics as inputs for predictive metrics

The attribute used on the rows of the dataset report sets the level of the data by restricting the data to a particular level, or dimension, of the data model.

For example, if the Customer attribute is placed on the rows and the Revenue metric on the columns of a report, the data in the Revenue column is at the customer level. If the Revenue metric is used in the predictive model without any levels, then the data it produces changes based on the attribute of the report using the predictive metric. If Year is placed on the rows of the report described previously, the predictive metric calculates yearly revenue rather than customer revenue. Passing yearly revenue to a predictive model based on customer revenue yields the wrong results.

This problem can be easily resolved by creating a separate metric, which is then used as an input for the predictive metric. This separate metric can be created to match the metric definition for Revenue, but also define its level as Customer. This approach is better than adding a level directly to the Revenue metric itself because the Revenue metric may be used in other situations where the level should not be set to Customer.

Before you begin

This topic assumes you are familiar with metric level, or dimensionality, as well as creating a metric. For more information, see Level metrics and Creating metrics in reports.

To create level metrics to use as inputs for predictive metrics

  1. In MicroStrategy Developer, open the metric that requires dimensionality. (How?)

  2. Click Level (Dimensionality). The Level (Dimensionality) component window displays below the Metric Definition area.

  3. In the Object Browser, double-click each attribute used in your data mart report. The attributes are placed in the metric expression.

  4. 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 outer join type for the metric used as an input for the predictive metric 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.

  5. 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 spaces and special characters cannot be included.

    • Click OK.

  6. From the File menu, select Save As. The Save As dialog box opens.

  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.