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

Highlighting siblings with the best/worst values

Data analysis becomes easier once we provide more information than a simple black and white grid allows us. One way of doing this is to color-code some cells. In this recipe, we'll show how to highlight the cells with the minimum and the maximum values among siblings and how to color-code them based on their values relative to their siblings' values.

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 Product dimension. Here's the query we'll start from:

SELECT { [Measures].[Internet Sales Amount] } ON 0, NON EMPTY { Descendants( ...

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