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 to. 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 2012 instance. Click on the New Query button and check that the target database is Adventure Works DW 2012.
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( [Product].[Product Categories].[Category], 1, SELF ) } ON 1 FROM [Adventure Works]
Once executed, the query returns the value of the Internet Sales Amount
measure for every single product subcategory. Part of the result is shown...