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 will show you how to highlight 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 2016 instance. Click on the New Query button and check that the target database is Adventure Works DW 2016.

In this example, we are going to use the Product dimension. Here is the query we'll start from:

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

Get MDX with Microsoft SQL Server 2016 Analysis Services Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.