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

Finding the name of a child with the best/worst value

Sometimes there is a need to perform a for-each loop in order to get the top or bottom members in the inner hierarchy for each member in the outer hierarchy. The recipe Identifying the best/worst members for each member of another hierarchy deals with exactly that kind of a topic.

In this recipe, we'll show another possibility. We'll demonstrate how to identify the member with the best/worst value, only this time we are not going to return the member itself. This time, we are going to return only its name in a calculated measure.

Getting ready

Start SQL Server Management Studio and connect to your SSAS 2008 R2 instance. Click on the New Query button and check that the target database is Adventure ...

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