1 Reply Latest reply: Jun 28, 2011 2:48 AM by Kaushik Solanki RSS

    Sum(Descendants) in MDX Part II

      Dear

       

       

      sum({<#Equipment = {">0"}>}SalesAmount) / sum(#Equipement)

       

      Sum(if(#Equipment >0, SalesAmount,0)) / Sum(#Equipment)

       

      Both of them, give me the same result but it is not what I want. This is becasue there is two records of customer 1004.

       

      In SQL Analysis Services, I can get the answer by using this MDX.

       

      sum(Descendants([Customer].CurrentMember,[Customer].Customer),

      (iif ([Measures].[#Equipment)] > 0, [Measures].[SalesAmount] / , 0))) / [Measures].[#Equipment]

       

      Please advise.

       

      Best Regards,

       

      Anote