March 25, 2010 at 10:38 am
No worries 🙂 We can do this like this:
1. In the properties of the column you want the color chnage to occur, go to Appearance | BackgroundColor and select the drop down <Expression...>. Then you'd do something like this for a Table:
=swithch(isnothing(Fields!Width.Value) = 0, "transparent",
Fields!Width.Value = <your value/threshold>, "green",
Fields!Width.Value = <your value/threshold>, "yellow",
Fields!Width.Value = <your value/threshold>, "red")
You may not need a IsNothing statement but I provided one just in case your dataset does return NULL values. Now the Fields!Width.Value can use other aggregates like <>, <, > , =. You can also Use OR and AND statements if you want to set the condition to look at two different columns. You can also use IIF instead of SWITCH. My preference is SWITCH because nesting IIF statements can get confusing 🙂
In a Matrix you should/may need to use an aggregate like SUM, AVG, MIN and so forth before Fields!Width.Value
I hope that is of some help. 🙂 Let me know if I can help more!
Frederick (Fred) J. Stemp, Jr.
Database Administrator / Database Developer
Dealer Funding, LLC
'...if they take my stapler then I'll set the building on fire...'
May 12, 2010 at 10:30 am
What if I am calculating sum of values in a matrix and then based on the results would like to find out the max or min and not from the main select query itself ? I guess an example scenario will be useful , if Yes please let me know and I'll provide one...
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply