SSRS Space 参数值问题

SSRS Space Issue in Parameter Value

我在 SSRS 报告中遇到了一些参数问题,当我的多值参数在两者之间包含 space 时,我得到语法错误

如果我选择任何其他不包含 space 的参数值,那么它工作正常。我正在使用 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]

尝试将状态参数查询更改为:

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 列作为状态参数的值属性。那么即使有空格,您的下游查询也应该有效。