1

我想要带有like子句的维度值..我试过这个

WITH 
SET CITY
AS
FILTER(
      [CITY].[CITY].CHILDREN,
      vbamdx!INSTR([CITY].[CITY].CURRENTMEMBER.Name,'In',1 >= 1 )
)
   MEMBER [Measures].[Label] AS [CITY].[CITY].CURRENTMEMBER.MEMBER_CAPTION 
SELECT {[Measures].[Label]
      } ON COLUMNS , 
      [CITY].[CITY].ALLMEMBERS ON ROWS 
FROM [TEST_Cube]

想要名称包含“In”的所有城市。

4

1 回答 1

3

您没有使用您制作的过滤集。

此外,您将您的集合命名为与可能给您带来麻烦的维度相同。

尝试:

WITH 

SET FilteredCities AS
FILTER
(
    [CITY].[CITY].CHILDREN,
    vbamdx!INSTR([CITY].[CITY].CURRENTMEMBER.Name,'In',1 >= 1 )
)

MEMBER [Measures].[Label] AS 
[CITY].[CITY].CURRENTMEMBER.MEMBER_CAPTION 

SELECT 
{
    [Measures].[Label]
} 
ON COLUMNS , 
      FilteredCities //Use the set
ON ROWS 
FROM [TEST_Cube]
于 2013-04-11T13:24:52.960 回答