In any type of analysis, it's important to separate the relevant data from the irrelevant. Many approaches to this type of filtering are available, but a common approach is to find the top n items or the bottom n items based on some criteria. In a cube such as FoodMart Sales, filtering products isn't always as simple as finding the top n products across the whole product dimension.

For this puzzle, use the FoodMart 2000 Sales cube and write an MDX query that finds the top five product names in each product department. Use Store Sales to rank the products, and include the product department dimension member before each group of product names. The products should be on the rows, and the quarters of 1997 should be on the columns. All values displayed should be Store Sales.