using count of dimension members as measure

  • You are on the right track, and to get values for a particular time period, you have to crossjoin using the current context. Also, use DistinctCount instead of Count...

    Here is a sample query from AdventureWorks:

    WITH member [Measures].[Product Count] AS

    DistinctCount([Date].[Fiscal Weeks].CurrentMember * [Product].[Product Categories].[Product].Members * {[Measures].[Internet Order Quantity]})

    SELECT {[Measures].[Product Count]} ON COLUMNS,

    [Date].[Fiscal Weeks].[Fiscal Week] ON ROWS

    FROM [Adventure Works]

Viewing post 1 (of 2 total)

You must be logged in to reply to this topic. Login to reply