August 2001 MDX Puzzle Solution Revealed

In "Analyze Disk Utilization," August 2001, I introduced an analysis application that lets you explore the contents of your hard disk. The August MDX Puzzle, which was related to this application, challenged you to write an MDX query that returns a ranked set of the top 10 first-level subdirectories based on disk usage. You could also write an analogous query on the FoodMart HR cube that returns a ranked set of the top 10 first-level managers, based on number of employees.

Listing A shows the query for the DiskData cube. Listing B shows the query for the HR cube. Both queries use a special option of the Descendants() function, called Leaves, which returns all of an unbalanced hierarchy’s leaves. After you have all the leaves, you can determine the first-level parents by using a Generate() function that returns the list of unique parents of the leaves. The next step is to eliminate the parents that have grandchildren, because elements with grandchildren aren’t technically first-level parents. Last, you use the TopCount() function to return a ranked set of the top 10 first-level parents.

From the Blogs

Many organizations today cannot use public cloud solutions because of security concerns, administrative challenges and functional limitations. However, they still need a centralized platform where end users can conduct self-service analytics in an IT-enabled environment....More

It is crucial to move away from data and analytics stored on individual desktop computers. Today’s solutions must promote holistic, collective intelligence. The strong, continued alliance between Microsoft and Pyramid Analytics helps make all this possible....More

To become a truly data-driven enterprise, many business leaders recognize that they must extend the capabilities of self-service business intelligence (BI) and analytics to more of their business users. Many BI tools tackle part of this need, but they don’t offer a complete enterprise solution....More