在MDX中传递MultiValue参数

时间:2012-01-12 17:34:03

标签: reporting-services mdx

如何将多选参数从SSRS传递到MDX?

我尝试如下,但没有按预期工作:

WHERE ({IIF( STRTOSET(@Name, CONSTRAINED).Count = 1,
STRTOSET(@Name, CONSTRAINED), [Name].currentmember )})

1 个答案:

答案 0 :(得分:0)

您可以直接使用:

WHERE ( STRTOSET(@Name, CONSTRAINED) )

或(不确定):

WHERE ( IIF( STRTOSET(@Name, CONSTRAINED).Count = 1, 
         STRTOSET(@Name, CONSTRAINED), 
         STRTOMEMBER(@Name, CONSTRAINED) ) )

然而,SSAS和设置切片器并不总是好朋友。如果可能,请改用MDX Subselects

WHERE ( SELECT STRTOSET(@Name, CONSTRAINED) ON 0 FROM .. )