A blog about designing and developing Business Intelligence solutions using Microsoft SQL Server
Header

SSAS Set Colour of Non-Calculated Measures

October 25th, 2011 | Posted by David Stewart in Analysis Services

Recently I had a requirement to set the colour of a couple of non-calculated measures in Analysis Services to differentiate between an actual and inferred value. It was another one of those things that I’d remembered being as simple as selecting a value from the properties screen… Unfortunately my memory deceives me and I was greeted with a properties window totally devoid of any colour settings!

Conveniently it’s easy (enough) to set the colours using MDX in the cube calculation script. SSAS defines colour values using a somewhat strange system, there’s a great post from Boyan Penev explaining this – Colour Codes in SSAS.

To set the colour of the Amount measure in the Adventure Works cube to a lovely shade of pink, you’d add the following line to the cube calculation script…

1
FORE_COLOR ( [Measures].[Amount] ) = 16711935;

With the resulting err… lovely pink measure when browsed from Management Studio.

Pink Coloured Non-Calculated Measure

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>