• subscribe
October 19, 2000 12:00 AM

October MDX Puzzle Solution Revealed

SQL Server Pro
InstantDoc ID #15527

From the FoodMart (or FoodMart 2000) Sales cube, list the beer products that have at least 100 unique customers. For each of these popular beers, display the unit sales and the number of customers.

WITH member [Measures].[NumCust] AS 'Count( Filter(
	[Customers].[Name].Members, Not IsEmpty([Unit Sales]) ) )'
	SET [Popular Beers] AS 'Filter([Beer].Children, [NumCust] > 100)'
SELECT [Popular Beers] ON columns,
	{ [Unit Sales], [NumCust] } ON rows
FROM Sales

To solve this puzzle, I created a calculated member that returns the number of unique customers for a particular product. Then, I created a set that included the beer products that had more than 100 unique customers.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here