Search code examples
mdxolapadventureworks

Calculating total Amount of Internet Sales (AdventureWorks data) MDX


How can I count the total number of sales in the "FactInternetSales" table for the selected member of the DATES hierarchy?

(
[Order Date].[DATES].CURRENTMEMBER, 
COUNT(DISTINCT([Fact Internet Sales].[Sales Order Number].[Sales Order Number]
)

this is what I have at the moment however it doesn't work :/


Solution

  • Try count on the outside with extra braces to indicate a set of tuples:

    COUNT(
      {  
        [Order Date].[DATES].CURRENTMEMBER
        *
        [Fact Internet Sales].[Sales Order Number].[Sales Order Number]
      }
    )