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

Displaying few important members, others as a single row, and the total at the end

There are times when isolating the best or worst members is not enough. End users often want to see the total of all members as well as the difference, a single row representing all other members not included in the report. This recipe shows how to fulfill this requirement.

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 Works DW 2008R2.

In this example we're going to use the Reseller dimension. Here's the query we'll start from:

WITH SET [Ordered Resellers] AS Order( [Reseller].[Reseller].[Reseller].MEMBERS, [Measures].[Reseller Sales Amount], ...

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