我在SSRS报告中遇到一些参数问题,当我的Multi值参数包含介于两者之间的空间时,我得到语法错误
如果我选择任何其他不包含空格的参数值,那么效果很好。我使用SSAS多维数据集作为数据源
WITH MEMBER [Measures].[PV] AS @Percentile
Member [Measures].[CntCT] as Count(NonEmpty(STRTOSET(@State) * [Tb Main].[UID].[UID].ALLMEMBERS,[Measures].[CPT1] ))
Member [Measures].[PVInt20] as Int(((([Measures].[CntCT] - 1)* [Measures].[PV])/100) - 1)
Member [Measures].[PVC] as
([Measures].[CPT1],Order(NonEmpty(STRTOSET(@State)*[Tb Main].[UID].[UID].ALLMEMBERS ,
[Measures].[CPT1]), [Measures].[CPT1],BASC).Item([Measures].[PVInt20]))
Select [Measures].[PVC] on columns, STRTOSET(@State) on rows from [POC 1];
查询在查询设计器中使用参数和整个唯一名称,即[Tb Main].[State Name].&[Wash DC]
答案 0 :(得分:0)
尝试将状态参数查询更改为:
WITH
MEMBER [Measures].[ParamValue] as [Tb Main].[State Name].CurrentMember.UniqueName
SELECT { [Measures].[ParamValue] } ON COLUMNS,
NonEmpty ([Tb Main].[State Name].[State Name].ALLMEMBERS, [Measures].[CPT1] ) DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM [POC 1]
使用ParamValue列作为state参数的value属性。然后,即使有空格,您的查询下游也应该工作。