VarP function (MDX)

The VarP function returns the population variance of a numeric expression evaluated over a set. Use this function when your set contains every member of the population you are interested in.

Returns: A number.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-VarP--(--SetExpression--+----------------------+--)---------><
                           '-,--NumericExpression-'      

Parameters

SetExpression
Specifies the set that contains the data whose variance is to be computed.
NumericExpression
Specifies a numeric expression that is applied to members of the set to determine the values whose variance is to be computed. This expression is typically a measure.

Example

The following example uses the VarP function to return the standard variance of the number of items evaluated over the days in a month for each month in the year 2002, using the biased population formula.

Query
WITH 
MEMBER [Price Analysis].[Measures].[VarP(Number Of Items)] 
AS VarP(Descendants([Price Analysis].[Time].CurrentMember, -1, LEAVES), 
[Price Analysis].[Measures].[Number Of Items])
SELECT {[Price Analysis].[Measures].[VarP(Number Of Items)]} 
ON AXIS(0),
{Descendants([Price Analysis].[Time].[All Time (Calendar)].[2002], 
[Price Analysis].[Time].[Calendar Month Level (Price Analysis)])} 
ON AXIS(1)
FROM [Price Analysis]
Result
Time VarP(Number Of Items)
1 26865.444
2 10040.91
3 1519.68
4 1492.515
5 967.54
6 1965.468
7 1779.173
8 3758.16
9 2091.957
10 1415.591
11 NaN
12 NaN


Feedback | Information roadmap