May 6, 2016 at 5:31 am
In SSRS reports I have 2 columns A and B with values like this
A B
100 75 -
100 65
100 85
100 90
100 80
100 76
I should color code Col B cells green if
B >= 0.75*A and B <= 0.85* A
else it will be Red
So for above values :
It will be
Green
Red
Green
Green
Green
Green
Green
May 6, 2016 at 6:41 am
Right click the appropriate cell and select text box properties. Navigate the the Fill Pane (I've assumed your doing the Fill colour, if you're doing text colour, then go to the font pane). Near the top, click the fx button, which will open up an input window. Then enter the code below, change the field reference to your local one:
=iif((Fields!ColB.Value >= (0.75 * Fields!ColA.Value)) and (Fields!ColB.Value <= (0.75 * Fields!ColA.Value)), "Green", "Red")
You can, if you wanted, easily change the colours something less harsh, as the colours look like this: [highlight="#00FF00"]Green[/highlight], [highlight="#FF0000"]Red[/highlight]. BEAUTIFUL 😛
Edit: Hmmm my Greater than and less than Symbols are being blapped out. you'll need to replace those when you copy it out. Sorry,
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply