Back to Declic Consulting web site.. 'Don't do anything' color..

'Don't do anything' color..

by patricet28 28. November 2008 09:32

Sometimes, you need to change the BACK_COLOR of a cell, based on the result of an evaluation, such as 'Change color to YELLOW if Condition A is TRUE'. But what if you don't want to change the BACK_COLOR if Condition A evaluates to FALSE (and leave the back color as it was)? Surprisingly, the answer is quite simple... Just set it to NULL.

For example, change the BACK_COLOR to Yellow if the flag 'NewFact' is greater than 0, otherwise leave it alone:

BACK_COLOR(this) =

    IIF([Measures].[NewFact] > 0

    , 65535 /*Yellow*/

    , NULL /* Don't do anything */) ;

Very clean, simple and it won't mess with any pivot table formatting theme you might have chosen.. I love it!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

TextBox

Tag cloud

RecentPosts