The MDX functions
that are listed here indicate their return type.
returns a calculated
value by using the appropriate aggregate function, which is based
on the aggregation type of the member. Aggregate(<Set[,<Numeric
Expression>])
returns the average
value of a numeric expression that is evaluated over a set. Avg(<Set>[,<Numeric Expression>])
Example:
The following example shows a moving average across all dimensions
of time.Avg(time.currentmember.lag (if(time.currentmember.level
is time.month_num,2, if(time.currentmember.level is time.quarter,1,0)))
:time.currentmember, measures.[total_retail_pricesum])
The Total_Retail_PriceSUM is included in the following query to see
the difference between the moving average and the total retail price.SELECT {[measures].[movingaverage],[measures]. [total_retail_pricesum]
} ON COLUMNS , {[time].[yqm].[all yqm].children } ON ROWS FROM
[orionstar]
returns a coalesced
value. This value is derived when an empty cell value is coalesced
to a number or string. CoalesceEmpty(<Numeric Expression>[,<Numeric
Expression>])
returns the correlation
of two series that are evaluated over a set. Correlation(<Set>,<Numeric
Expression>[,<Numeric Expression>])
depending on the collection,
returns the number of items in a collection. <Dimension>|<Hierarchy>.Levels.Count
<Tuple>.Count
<Set>.Count
Count(<Set>[,ExcludeEmpty | IncludeEmpty])
returns the population
covariance of two series that are evaluated over a set by using the
biased population formula.Covariance(<Set>,<Numeric
Expression>[,<Numeric Expression>])
returns the sample
covariance of two series that are evaluated over a set by using the
unbiased population formula. CovarianceN(<Set>,<Numeric
Expression>[,<Numeric Expression>])
returns the number
of distinct, non-empty tuples in a set. DistinctCount(<Set>)
returns one of two
numeric or string values that are determined by a logical test. IIF(<Logical Expression>, <Numeric Expression1>, <Numeric
Expression2>)
Note: If a string
is returned, then it is a string function, not a numeric function.
calculates the linear
regression of a set and returns the value of b in the regression line
y = ax + b. LinRegIntercept(<Set>,<Numeric
Expression>[,<NumericExpression>])
calculates the linear
regression of a set and returns the value of y in the regression line
y = ax + b. LinRegPoint(<NumericExpression>,<Set>,<NumericExpression>
[,<Numeric Expression>])
calculates the linear
regression of a set and returns R2 (the
coefficient of determination).(Set, Numeric Expression[,
Numeric Expression])
calculates the linear
regression of a set and returns the value of a
in the regression line y = ax + b. LinRegSlope(<Set>,<NumericExpression>[,<NumericExpression>])
calculates the linear
regression of a set and returns the variance associated with the regression
line y = ax + b. (Set, Numeric Expression[, Numeric Expression])
returns the maximum
value of a numeric expression that is evaluated over a set. Max(<Set>[,<Numeric Expression>])
returns the median
value of a numeric expression that is evaluated over a set. Median(<Set>[,<Numeric Expression>])
returns the minimum
value of a numeric expression that is evaluated over a set. Min(<Set>[,<Numeric Expression>])
returns the zero-based
ordinal value that is associated with a level. <Level>.Ordinal
returns the range,
which is the difference between the maximum and minimum value of a
numeric expression that is evaluated over a set. Range
(<Set>[,<Numeric Expression>])
returns the one-based
rank of a specified tuple in a specified set. Rank(<Tuple>,<set>[,<Calc
Expression>])
returns a value that
is generated by rolling up the values of the children of a specified
member by using the specified unary operator. RollupChildren(<Member>,<String
Expression>)
using the unbiased
population formula, returns the sample standard deviation of a numeric
expression that is evaluated over a set. Stdev(<set>[,<Numeric
Expression>])
using the biased population
formula, returns the population standard deviation of a numeric expression
that is evaluated over a set. StdevP(<set>[,<Numeric
Expression>])
returns a value from
a string expression. StrToValue(<StringExpression>)
returns the sum of
a numeric expression that is evaluated over a set. Sum(<Set>[,<Numeric
Expression>])
returns the value of
a measure. <Member>.Value
using the unbiased
population formula, returns the sample variance of a numeric expression
that is evaluated over a set. Var(<Set>[,<Numeric
Expression>])
using the biased population
formula, returns the population variance of a numeric expression that
is evaluated over a set. VarP(<Set>[,<Numeric
Expression>])