MicroStrategy ONE
VarP (Variance of a Population)
Variance is a measure of how spread out a set of values is.
VarP
returns this measure based on an entire population. This is a group-value function.
Syntax
VarP <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
For this function, arguments relate to an entire population as opposed to a population sample.
Example
Variance is calculated as the average squared deviation of each number from its mean. This example creates a report in which the variance of the units sold in the subcategories within a category is calculated with the assumption that the data provided represents the entire population.
Compare this example report to the example for variance of a sample to see the different values returned when calculating for a population as opposed to a sample.
The report includes the attributes Category and Subcategory, and the metrics Units Sold and VarP by Category. A report filter limits the categories displayed to Books and Movies. The VarP by Category metric is defined as follows:
VarP([Units Sold]) {Category, ~}