Results 1 to 2 of 2

Thread: MDX Problems with cumulative totals of distinctCount Measure in Function PeriodsToDat

  1. #1
    Join Date
    Mar 2005
    Posts
    2

    MDX Problems with cumulative totals of distinctCount Measure in Function PeriodsToDat

    Hello Experts,

    I have a Problem with cumulative totals of DistinctCount of customers while working in the MDX-Query-Designer of Analysis Services.
    The measure [Measures].[DC Customer] is a distinct count of CustomerNr of Customers who have purchased products.
    I use

    With Member [Measures].[DC Custumer kum] As 'Sum (Periostodate([Time].[Year]),[Measures].[CD Customer kum]'
    Select {[Measures].[DC Custumer],[DC Custumer kum]} on colums,
    [Productgroup].[Maingroup].members on rows
    From Sales
    Where [Time].[All_Time].[2005].[March]

    but it returns the sum of [Measures].[DC Customer] and added the January, February and March value.
    I need to get the value of customers who have purchased products from january to march.

    Can anyone help?
    Thank you in advance

  2. #2
    Join Date
    Mar 2007
    Posts
    1
    Hi,

    Try This.

    With Member [Measures].[DC Custumer kum] As 'Sum (Periostodate([Time].[Year].CurrentMember.Level,
    [Time].[Year].CurrentMember), [Measures].[DC Customer])'

    Select {[Measures].[DC Custumer],[DC Custumer kum]} on colums,
    [Productgroup].[Maingroup].members on rows
    From Sales
    Where [Time].[All_Time].[2005].[March]

    If you already have the distinct count of CustomerNr you just need to sum that values between your time currentMember and the begin of the year at the month level.

    Best Regards,

    Hugo Lopes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •