函数
|
描述
|
Aggregate
|
返回根据查询的上下文,用适当的聚合函数计算所得的值。
|
|
WITH
MEMBER
store.Total
AS
'
AGGREGATE
({[Store].[All Stores].[USA].[CA], [Store].[All Stores].[USA].[OR]})'
SELECT
{Measures.[store sales], Measures.MaxSales}
ON
COLUMNS
,
{[Store].[All Stores].[USA].[CA],[Store].[All Stores].[USA].[OR], Total}
ON
ROWS
FROM
Sales
比较
WITH
MEMBER
store.Total
AS
'
sum
({[Store].[All Stores].[USA].[CA], [Store].[All Stores].[USA].[OR]})'
SELECT
{Measures.[store sales], Measures.MaxSales}
ON
COLUMNS
,
{[Store].[All Stores].[USA].[CA],[Store].[All Stores].[USA].[OR], Total}
ON
ROWS
FROM
Sales
|
Avg
|
返回在某一集合上对数值表达式求得的平均值。
|
|
WITH
MEMBER
store.Total
AS
'
Avg
({[Store].[All Stores].[USA].[CA], [Store].[All Stores].[USA].[OR]})'
SELECT
{Measures.[store sales], Measures.MaxSales}
ON
COLUMNS
,
{[Store].[All Stores].[USA].[CA],[Store].[All Stores].[USA].[OR], Total}
ON
ROWS
FROM
Sales
|
CalculationCurrentPass
|
针对当前查询上下文返回多维数据集的当前计算传递。
|
|
with
member
[Time].[1997].[Q2-Q1]
as
'[Time].[1997].[Q2] - [Time].[1997].[Q1]',
SOLVE_ORDER
=1
SELECT
{ {
Filter
({{[Time].[1997].[Q1], [Time].[1997].[Q2], [Time].[1997].[Q2-Q1] }}*{
[Measures].[Sales Average]},
([Time].[1997].[Q1], [Measures].[Store Sales])>0) } }
ON
COLUMNS
, {[Store].[Store Country]
.members
}
ON
ROWS
FROM
Sales
比较如果不加,
SOLVE_ORDER
=1
会怎样?
|
CalculationPassValue
|
返回在当前多维数据集的指定计算传递上对 MDX 表达式求得的值。
|
|
|
CoalesceEmpty
|
将空单元值合并为数字或字符串。
|
|
with
member
[Measures].[abc]
as
'
iif
(
CoalesceEmpty
( [Measures].[Store Sales],1)=1 ,
"
空的"
,
"
不空的"
)',
SOLVE_ORDER
=1
SELECT
{{{[Time].[1997].[Q1], [Time].[1997].[Q2] }}*{
[Measures].[Store Sales],[Measures].[abc]}}
ON
COLUMNS
, {[Store].[Store Country]
.members
}
ON
ROWS
FROM
Sales
|
Correlation
|
返回在某一集合上对两个系列求得的相关性。
|
|
|
Count
|
返回多维数据集中的维度数、维度中的级别数、集合中的单元数或元组中的维度数。
|
|
with
member
[measures].[abc]
as
'
Descendants
([Store]
.currentmember
,0,
AFTER
)
.count
'
SELECT
{{{[Time].[1997].[Q1], [Time].[1997].[Q2] }}*{
[Measures].[Store Sales],[measures].[abc] }}
ON
COLUMNS
, {[Store].[Store Country]
.members
}
ON
ROWS
FROM
Sales
|
Covariance
|
返回使用偏置填充公式在某一集合上对两个系列求得的总体协方差。
|
CovarianceN
|
返回使用非偏置填充公式在某一集合上对两个系列求得的样本协方差。
|
DistinctCount
|
返回集合中的元组数,不包括重复的元组。
|
|
WITH
MEMBER
Measures.a
as
'
DistinctCount
(
DESCENDANTS
( [Product].[Product Family].&[Drink].&[Alcoholic Beverages].&[Beer and Wine].&[Wine].&[Good], [Product].[Product Name] ))'
SELECT
{ { [Time].&[1997].&[Q1].&[2] } * { Measures.a, [Measures].[Store Sales], [Measures].[Store Sales Net], [Measures].[Unit Sales] } }
ON
COLUMNS
,
{ { [Store].[Store Name].&[6] } * {
DESCENDANTS
( [Product].[Product Family].&[Drink].&[Alcoholic Beverages].&[Beer and Wine].&[Wine].&[Good], [Product].[Product Name] ) } }
ON
ROWS
FROM
[Sales]
|
IIf
|
返回由逻辑测试确定的两个数值或字符串值之一。
|
|
with
member
measures.abc
as
'
iif
(
isempty
(measures.[unit sales]),
"
空了
"
,
"
不空
"
)'
SELECT
{ { { [Time].&[1997] } * { [Measures].[Unit Sales],measures.abc } } }
ON
COLUMNS
, {
DESCENDANTS
( [Store].[All Stores], [Store].[Store Name] ) }
ON
ROWS
FROM
[Sales]
|
LinRegIntercept
|
对集合进行线性回归,并返回回归线公式 y = ax + b 中 b 的值。
|
|
|
LinRegPoint
|
对集合进行线性回归,并返回回归线公式 y = ax + b 中 y 的值。
|
|
|
LinRegR2
|
对集合进行线性回归,并返回 R2(确定系数)。
|
LinRegSlope
|
对集合进行线性回归,并返回回归线公式 y = ax + b 中 a 的值。
|
LinRegVariance
|
对集合进行线性回归,并返回与回归线公式 y = ax + b 相关的方差。
|
LookupCube
|
返回在同一数据库中另外一个指定的多维数据集上对 MDX 表达式求得的值。
|
|
with
member
measures.abc
as
'
LookupCube
(
"Warehouse"
,
"("
+time
.currentmember.uniquename
+
",measures.[warehouse sales])"
)'
SELECT
{ [Measures].[Unit Sales],measures.abc }
ON
COLUMNS
, { [Time]
.allmembers
}
ON
ROWS
FROM
[Sales]
|
|
WITH
MEMBER
Measures.[Store Unit Sales]
AS
'
LookupCube
(
"Sales"
,
"("
+
MemberToStr
(Store
.CurrentMember
) +
", Measures.[Unit Sales])"
)'
SELECT
{Measures.Amount, Measures.[Store Unit Sales]}
ON
COLUMNS
,
Store.CA
.CHILDREN
ON
ROWS
FROM
Budget
|
Max
|
返回在某一集合上对数值表达式求得的最大值。
|
|
with
member
measures.abc
as
'
max
(
Descendants
([Time]
.currentmember
,
quarter
),[unit sales]) '
SELECT
{ [Measures].[Unit Sales],measures.abc }
ON
COLUMNS
, { [Time].[1997],[Time].[1998] }
ON
ROWS
FROM
[Sales]
|
Median
|
返回在某一集合上对数值表达式求得的中值。
|
|
with
member
measures.mid
as
'
Median
(
Descendants
([Time]
.currentmember
,
quarter
),[unit sales]) '
member
measures.[avg]
as
'
avg
(
Descendants
([Time]
.currentmember
,
quarter
),[unit sales]) '
SELECT
{ [Measures].[Unit Sales],measures.mid,measures.[avg] }
ON
COLUMNS
, { [Time].[1997],[Time].[1998] }
ON
ROWS
FROM
[Sales]
|
Min
|
返回在某一集合上对数值表达式求得的最小值。
|
|
with
member
measures.min
as
'
min
(
Descendants
([Time]
.currentmember
,
quarter
),[unit sales]) '
SELECT
{ [Measures].[Unit Sales],measures.[min] }
ON
COLUMNS
, { [Time].[1997],[Time].[1998] }
ON
ROWS
FROM
[Sales]
|
Ordinal
|
返回级别的以零为基的序数值。
|
|
with
member
measures.abc
as
' [Time]
.currentmember.level.Ordinal
'
SELECT
{ [Measures].[Unit Sales],measures.[abc] }
ON
COLUMNS
, { [Time]
.allmembers
}
ON
ROWS
FROM
[Sales]
|
Predict
|
计算当前坐标中指定的数据挖掘模型中的字符串表达式。
|
|
|
Rank
|
以一为基返回元组在集合中的阶。
|
|
with
member
measures.abc
as
'
Rank
(([Time].[1997].[Q1].[2],[Measures].[Sales Count]),
{([Time].[1997].[Q1].[1],[Measures].[Store Cost]),
([Time].[1997].[Q1].[2],[Measures].[Sales Count]),
([Time].[1997].[Q1].[3],[Measures].[Profit])}
)'
SELECT
{ [Measures].[Unit Sales],measures.[abc] }
ON
COLUMNS
, { [Time].[1997] }
ON
ROWS
FROM
[Sales]
|
RollupChildren
|
扫描成员参数的子代并将字符串表达式运算符应用于计算所得的值。
|
|
with member measures.abc as
'RollupChildren([Accounttest].CurrentMember, [Accounttest].CurrentMember.Properties("AccountRollup"))'
member measures.abcd as '[Accounttest].CurrentMember.Properties("AccountRollup")'
SELECT { {[Time].&[1997] }*{ [Measures].[Amount],measures.abc ,measures.abcd} } ON COLUMNS ,
{ Descendants([Accounttest].[All Account],1,after) } ON ROWS FROM [Budgettest]
|
Stddev
|
Stdev
的别名。
|
StddevP
|
StdevP
的别名。
|
Stdev
|
返回使用非偏置填充公式对集合计算数值表达式所得的样本标准偏差。
|
StdevP
|
返回使用偏置填充公式对集合计算数值表达式所得的填充标准偏差。
|
StrToValue
|
根据字符串表达式返回值。
|
|
with
member
measures.abc
as
'
strtovalue
(
"555"
)'
SELECT
{ [Measures].[Unit Sales],measures.[abc] }
ON
COLUMNS
, { [Time]
.allmembers
}
ON
ROWS
FROM
[Sales]
|
Sum
|
返回在某一集合上对数值表达式求得的和。
|
|
with
member
measures.abc
as
'
SUM
( [Time]
.currentmember.children
,[Measures].[Unit Sales])'
SELECT
{ [Measures].[Unit Sales],measures.[abc] }
ON
COLUMNS
, { [Time]
.allmembers
}
ON
ROWS
FROM
[Sales]
|
Value
|
返回度量值的值。
|
|
没什么用处,未成功
|
Var
|
返回使用无偏置填充公式在某一集合上对数值表达式求得的样本方差。
|
Variance
|
Var
的别名。
|
VarianceP
|
VarP
的别名。
|
VarP
|
返回使用偏置填充公式对集合计算数值表达式的总体方差。
|