TupleToStr (MDX)
返回多维表达式 (MDX) 格式并与指定元组对应的字符串。
语法
TupleToStr(Tuple_Expression)
参数
- Tuple_Expression
返回元组的有效多维表达式 (MDX)。
注释
此函数用于将元组的字符串表示形式传输给外部函数进行分析。 返回的字符串将用大括号 {} 括起来;如果元组中明确定义了多个成员,则每个成员之间用逗号分隔。
示例
下面的示例返回字符串 ([Date].[Calendar Year].&[2001],[Geography].[Geography].[Country].&[United States]):
WITH MEMBER Measures.x AS TupleToStr
(
([Date].[Calendar Year].&[2001]
, [Geography].[Geography].[Country].&[United States]
)
)
SELECT Measures.x ON 0
FROM [Adventure Works]
下面的示例与上面的示例返回相同的字符串。
WITH SET s AS
{
([Date].[Calendar Year].&[2001],
[Geography].[Geography].[Country].&[United States]
)
}
MEMBER Measures.x AS TupleToStr ( s.Item(0) )
SELECT Measures.x ON 0
FROM [Adventure Works]