MicroStrategy ONE

Changing the embedding method of conditional metrics

Merging the filter of a report and the filter of a conditional metric is accomplished by embedding one filter in the other or by embedding both filters in a new, empty filter. By default, the report filter is applied before the metric filter.

The embedding method is relevant only if at least one filter contains a metric qualification, relationship qualification, or shortcut-to-a-report qualification. The results from these types of qualifications can vary. For example, filtering on "country=US" always yields the same results. This is an example of anattribute qualification. However, filtering on "country where revenue is greater than $1000" can return different results if the data is for 2022 only, 2023 only, or both years combined. This is a metric qualification.

Embedding method options

The options for the embedding method are described below, using an example where the metric filter is revenue greater than $100 and the report filter is bottom 10 items for sales.

  • Merge report filter into metric applies the report filter criteria to the data first. Then the metric filter is applied to the results of the first evaluation. This is the default setting.

    In the example given above, the report filter narrows the result set to only 10 items, and then the metric condition filters out, from those 10 items, any items with a revenue above $100. Only three items are returned. The report contains three rows of data.

  • Merge metric condition into report evaluates the metric filter first, then applies the report filter to those results.

    The metric condition returns all items with a revenue above $100, then the report filter takes only the bottom 10 of those items for revenue. The report contains 10 rows of data.

  • Merge into new intersects the metric and report filter. Only those results that meet both the metric filter and the report filter are returned.

    The two filters are merged, so that only those items that are in the bottom 10 in terms of sales and that have sales greater than $100 are included. If the other advanced option (Remove related report filter elements) is selected, as it is by default, the report filter is ignored. The filters use the same element (Item), so only the metric filter, for the bottom 10 sales, is applied. The report contains 10 rows of data.

The example is explained in more detail, with report samples, in the Advanced Metrics chapter of the Advanced Reporting Help. The chapter also includes additional explanations, examples, and diagrams.

Prerequisites

To change the embedding method of a conditional metric

  1. Open the metric in the Metric Editor. (How?)

  2. Click Condition on the Metric component pane (located under the heading "Metric (metric name) is defined as"). The Condition definition pane displays below the Metric component pane.

  3. Click Advanced. The Condition advanced options dialog box opens.

  4. Select one of the following Embedding methods from the drop-down list:

    • Merge into new intersects the metric filter and report filter.

    • Merge report filter into metric applies the report filter criteria to the data and then applies the metric filter to the results. This is the default setting.

    • Merge metric condition into report evaluates the metric filter first and then applies the report filter to those results.

  5. Click OK to return to the Metric Editor.

  6. Click Save and Close to save the metric and close the Metric Editor.

Related Topics