O'Reilly logo

MDX with Microsoft SQL Server 2008 R2 Analysis Services: Cookbook by Tomislav Piasevoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Isolating the best N members in a set

Hierarchies can contain a lot of members. In this recipe we are going to show how to extract only the significant ones; members with the highest value for a certain measure.

This requirement is often necessary because not only does it allow end users to focus their efforts on a smaller set of members, the queries are much faster as well.

We'll base our example on the TopCount() function, a function that returns the exact number of members as specified. In addition to that function, MDX has two more similar functions, namely TopPercent() and TopSum(). Contrary to TopCount() function, these functions return an unknown number of members. In other words, they are designed to return a set of members based on their ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required