Subscribe to Windows IT Pro
September 18, 2003 12:00 AM

October 2003 MDX Puzzle

SQL Server Pro
InstantDoc ID #39999
Rating: (0)

One of the most common problems in data analysis is narrowing down a list of items to show the items that are most relevant for a given situation. One way to narrow down a list is to filter the top 10 or top 100 items, but although using a TOPCOUNT() function guarantees that you'll have fewer items to view, it doesn't guarantee that the items left are the ones you want.

This month's challenge is to write a query that returns all the customers in the FoodMart 2000 Sales cube whose total Store Sales equal at least 5 percent of the sales to the customer who has the highest total Store Sales. Note that this is not exactly what the MDX TOPPERCENT() function does. TOPPERCENT() finds the items whose total Store Sales sum together to make a given percentage of the total Store Sales for all the items you specify. Write a query that displays all the qualifying customers on the rows and their total Store Sales values on the columns.

Related Content:

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

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.