我正在寻找一种将先前检索到的列表集成为 MDX 查询中 FILTER 的输入的方法。我目前有以下代码:
segment_var = Segment,
mdxQ = "SELECT
NON EMPTY ( { [Measures].[AMT] * [Forecast Type].[Forecast Type].[Forecast Level 2] } ) DIMENSION PROPERTIES MEMBER_NAME ON COLUMNS,
NON EMPTY ( {
[Period].[Year Month Name].[Name] *
[PL Spec].[PL Spec].[Level 6 Code].allmembers
} ) ON ROWS
FROM (
SELECT ( { [Forecast Type].[Current Indicator].&[Y] } ) ON COLUMNS
FROM (
SELECT ( { [PL Spec].[PL Spec].[Level 1 Code].&[101] } ) ON COLUMNS
FROM [AIR]))
WHERE (
FILTER([Management Structure - Segment].[Management Structure - Segment].[MS Level 5].ALLMEMBERS , [Management Structure - Segment].[Management Structure - Segment].currentmember.name=""" & segment_var & """))",
第 1 行上的段曾经是单个值参数,但我想使用段列表 (listSegment) 作为参考,以便结果过滤多个段。我已经尝试过 WHERE IN 解决方案,但我似乎无法让它工作。任何帮助,将不胜感激。
错误:
Expression.Error: We cannot apply operator & to types Text and List.