Should be possible, by setting the FORMAT_STRING property of a
calculation - see this post at Chris Webb's blog:
http://spaces.msn.com/cwebbbi/blog/cns!7B84B0F2C239489A!137.entry
Quote:
|
New formatting functionality in Yukon
|
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.
...
For example, in the Adventure Works cube, if you add this calculation to
the MDX Script, then cents show only for [Internet Sales Amount] <
$100K:
Quote:
|
Scope({[Measures].[Internet Sales Amount]});
|
FORMAT_STRING(this) = iif([Measures].[Internet Sales Amount] < 100000,
"Currency", "$#,###,###");
End Scope;
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***