Chris Webb's BI Blog

Analysis Services, MDX, PowerPivot, DAX and anything BI-related

New formatting functionality in Yukon

with one comment

Anyone who has looked at the AdventureWorks sample cube will probably have picked up by now that all the intrinsic member properties like FORMAT_STRING can now be defined with an MDX expression (in AS2K it was only FORE_COLOR and BACK_COLOR that you could do this with), but something else caught my eye today when I was looking at the tutorials in BOL: there are new MDX statements which allow you to set these properties on any area within a cube from a script. So you can now do things like:
BACK_COLOR(THIS)=RGB(255,100,100)
…to give everything in the current subcube a red background, or this:
FORMAT_STRING(THIS)="\H\e\l\l\o"
…to change the format of everything in the current subcube. I would imagine that FORE_COLOR, FONT_SIZE, FONT_FLAGS and FONT_NAME also exist although I’ve not had a chance to see whether they do indeed work. This makes it much easier to do funky traffic-light analysis-type stuff compared to having to set the property on a per-member basis.

 

Written by Chris Webb

February 14, 2005 at 3:20 pm

Posted in MDX

One Response

Subscribe to comments with RSS.

  1. Indeed all the calculation properties you mentioned can be referenced using this new syntax (don\’t you remember – I demo\’ed it during Yukon Tech Preview when you were in Microsoft :), as well as new calculation properties such as Language etc. The limitations are that assignments to calculation properties cannot be used inside IF statement, and you also cannot really FREEZE those properties.Strictly speaking, though, it is simple a syntactical sugar, since much of this functionality was possible in AS2K as well, by using CREATE CELL CALCULATION and putting CalculationPassValue(Measures.CurrentMember.Value,-1,RELATIVE) as an expression, and then doing real stuff inside BACK_COLOR.

    Mosha

    February 15, 2005 at 9:45 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 3,146 other followers

%d bloggers like this: