Subscribe to Windows IT Pro
June 17, 2003 12:00 AM

July 2003 MDX Puzzle

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

Use the FoodMart 2000 Sales cube to create an MDX query that finds the most recent nonzero sales amount for each customer in Los Angeles for each quarter of 1997. Format the quarters of 1997 on the columns and the individual customers in Los Angeles on the rows. In each cell, display the most recent monthly Store Sales value for that customer in that quarter. Here's a hint: This problem is very much like an inventory problem in which you want to aggregate the last known value for each time period. You need to create a measure that determines each time-dimension member's value by taking the value from the member's last non-empty child. Good luck! (You can read the solution to June's MDX puzzle on SQL Server Magazine's Web site at http://www.sqlmag.com, InstantDoc ID 39067.)

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.