• 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
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...