MDX计算成员过滤使用度量

MDX计算成员过滤使用度量,mdx,ssas-2012,Mdx,Ssas 2012,我需要你的帮助 我有这个密码 CREATE MEMBER CURRENTCUBE.[Measures].[Summary distribution by CSKU] AS count( NONEMPTY( crossjoin( descendants ([05_Goods].[CSKU].currentmember,,LEAVES), descendants ([04_Agents].[Agents hie

我需要你的帮助 我有这个密码

CREATE MEMBER CURRENTCUBE.[Measures].[Summary distribution by CSKU]
 AS count(
    NONEMPTY(
        crossjoin(
                descendants ([05_Goods].[CSKU].currentmember,,LEAVES),
                descendants ([04_Agents].[Agents hierarhy],,LEAVES)
            )        
        )
), 
FORMAT_STRING = "###,##0;-###,##0", 
NON_EMPTY_BEHAVIOR = { [Quantity] }, 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Distribution' ,  ASSOCIATED_MEASURE_GROUP = '01_Sales'  ;   
但是我想看到一个没有元素的结果,其中sum([Measures].[Sales amount])0

我怎么做? 谢谢


Dmitry

除了使用以下选项外,我没有其他选择:

。。。
作为伯爵(
过滤器(
交叉连接(
后代([05_货物][CSKU].currentmember,,叶),
后代([04_Agents]。[Agents hierarhy],,叶)
)
,[Measures]。[Sales amount]0)
)
您可以尝试将NonEmpty添加到后代方法以提高性能(如果某些后代没有[Sales Amount])

 ...
 AS count(
   FILTER(  
    crossjoin(
            descendants ([05_Goods].[CSKU].currentmember,,LEAVES),
            descendants ([04_Agents].[Agents hierarhy],,LEAVES)
        )
    ,  [Measures].[Sales amount] <> 0)
    )