【问题标题】:Filter dimensions for a specific member in MDX在 MDX 中过滤特定成员的维度
【发布时间】:2016-03-09 15:30:10
【问题描述】:

我需要为特定的 [Year].Member 过滤维度 [Line]。

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

我需要一个与 Mondrian 兼容的代码。 有什么建议吗?

选择 非空 {[Measures].[Sales]} 列, NON EMPTY NonEmptyCrossJoin([Time].[Years].Members, [Product].[Line].Members) ON ROWS 从 [钢轮销售]

【问题讨论】:

    标签: mdx olap mondrian


    【解决方案1】:

    这样的事情应该可以工作:

    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];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-05
      相关资源
      最近更新 更多