OLAP计算成员 - 摘要错误

时间:2017-08-30 08:06:14

标签: ssas mdx olap

我想请求您支持使用sum聚合在我的多维数据集中进行olap计算。目前它正在工作,当我在枢轴过滤器中不使用更多尺寸时。当我通过项目维度(项目编号)的其他属性进行过滤时,计算出的成员在总计中为我们提供相同的结果(与过滤器之前一样)。代码可以在这里找到:

CREATE 
  MEMBER CURRENTCUBE.[Measures].[Invoiced amount YTD on price level YTD PY] AS 
    IIF
    (
      IsLeaf([Item].[Item].CurrentMember)
     ,IIF
      (
          measures.[Average price YTD PY] = 0
        OR 
          IsEmpty(measures.[Average price YTD PY])
       ,
        measures.[Average price YTD] * measures.[Invoiced quantity YTD]
       ,
        measures.[Average price YTD PY] * measures.[Invoiced quantity YTD]
      )
     ,Sum
      (
        [Item].[Item].CurrentMember.Children
       ,[Invoiced amount YTD on price level YTD PY]
      )
    ) 
   ,FORMAT_STRING = '#,##0.00' 
   ,VISIBLE = 1 
   ,ASSOCIATED_MEASURE_GROUP = 'PI' ;

0 个答案:

没有答案