MDX 中特定成员的筛选维度

Filter dimensions for a specific member in MDX

我需要为特定的 [Year].Member.

筛选维度 [Line]

例如, [时间].[2004]显示结果([Product].[Line].[Classic Cars] 和 [Product].[Line].[Ships])-排除 [Time].[Time].[Line] 成员的其余部分 [Time].[2004]但不排除其他 [Time].Members 的 [Product].[Line] 成员。

我需要一个与蒙德里安兼容的代码。 有什么建议吗?

SELECT
    NON EMPTY {[Measures].[Sales]} ON COLUMNS,
    NON EMPTY NonEmptyCrossJoin([Time].[Years].Members, [Product].[Line].Members) ON ROWS
FROM 
    [SteelWheelsSales]

像这样的东西应该可以工作:

SELECT 
  NON EMPTY 
    {[Measures].[Sales]} ON COLUMNS
 ,NON EMPTY 
    {
      (
        [Time].[2004]
       ,{
          [Product].[Line].[Classic Cars]
         ,[Product].[Line].[Ships]
        }
      )
     ,NonEmptyCrossJoin
      (
        Except
        (
          [Time].[Years].MEMBERS
         ,[Time].[2004]
        )
       ,[Product].[Line].MEMBERS
      )
    } ON ROWS
FROM [SteelWheelsSales];