MicroStrategy ONE

GeoMean (Geometric Mean)

This function can be used to find the average for a set of values contributing to a product. While the Avg function is used to find the arithmetic mean for a set of values contributing to a sum, GeoMean can be used to determine the average growth rate for a given compound interest with variable rates.

This function takes the product of a set of values of size N and returns the Nth root of the result (also known as geometric mean). GeoMean is a group-value function.

Syntax

GeoMean <FactID>(Argument)

Where:

  • Argument is an attribute, fact, or metric representing a list of numbers.
  • FactID is a parameter that forces a calculation to take place on a fact table that contains the selected fact.

Expression

Usage Notes

This function returns an error if a value in the value list is negative.

Example

Suppose you have an investment that earns 10% the first year, 60% the second year, and 20% the third year, and you want to answer the question "What is its average rate of return?" You do not want to use the Avg function to obtain the arithmetic mean, because these numbers show that in the first year your investment was multiplied by 1.10, in the second year by 1.60, and in the third year by 1.20. The average is the geometric mean of these three numbers. This can be understood as looking for a constant that you can multiply each year's investment by, and get the same result as multiplying the first year by 1.10, the second year by 1.60, and so forth. This constant is the geometric mean.

(1.10 * 1.60 * 1.20)1/3 = 1.283

The geometric mean is 1.283, so the average rate of return is about 28%.