MicroStrategy ONE

Compound Metrics

The formula of a compound metric is based on arithmetic operators and non-group functions. Arithmetic operators are +, -, *, and /; non-group functions are OLAP and scalar functions such as running sum or rank. The operators and functions can be applied to facts, attributes, or metrics.

Several non-group functions that are frequently employed are described in MicroStrategy Advanced Reporting.

The following are examples of compound metric formulas:

  • Sum(Cost) + Sum(Profit)

    where Cost and Profit are facts joined by an arithmetic operator

  • Cost + Profit

    where Cost and Profit are metrics joined by an arithmetic operator

  • RunningAvg(Cost)

    where Cost is a metric and RunningAvg is a non-group function

You cannot set the level, conditionality, or transformation for a compound metric as a whole. A compound metric draws this information from each of its component metrics; each component metric can have its own levels, condition, and transformations. For example, levels can be set on the Cost and Profit metrics in the examples above, but not on the formula of the compound metric that contains them.

However, compound metrics, unlike simple metrics, can have smart subtotals, which allow a different evaluation order for the calculation. For more information on smart subtotals (also called smart metrics), see Smart Subtotals. You can also control how the expression or metrics within the compound metric are joined, as described in Formula Join Type for Compound Metrics.