SSRS 2008 Line Chart - Change the color of current month's line only
I have a line chart showing a running sum for loan amount in millions by day. Each line represents a month/year. I would like the current month/year line to be black (bold), so it stands out from the rest of the colors. I'd like the other colors to use the automatic color palette. I have tried several things and have been unsuccessfully in getting any of them to work. I tried setting the series properties fill color to an expression, but it breaks up the lines. Any help would be greatly appreciated. Graph:
April 2nd, 2012 12:43pm

You should be able to develop an IIF() statement that adjusts the colors. Something like IIF(Month(Yourdatefield)=Month(Today()),000000,<hex color code of the normal color for this series>) should make the current month black and the rest the color of your choosing.
Free Windows Admin Tool Kit Click here and download it now
April 2nd, 2012 1:44pm

I have tried this using the following formula, with just black/red color, but it doesn't seem to work. I would think the below should make all lines red, except for the current month. For some reason I get a werid colored line. =IIF(Fields!ACTUAL_FUNDING_MONTH_YEAR.Value = Fields!SYSDATE_MONTH_YEAR.Value,"Black","Red") "ACTUAL_FUNDING_MONTH_YEAR" is my series field and "SYSDATE_MONTH_YEAR" is in my SQL and used to pull back the current Month Year.
April 2nd, 2012 2:22pm

Hi rcdangelo, In your case, please refer to the following steps to get the desired report: In the design surface, right-click on the lines in the chart and select "Series Properties".Click "Fill" page, and then set the "Color" property by using the following expression: =Switch(Format(Fields!ACTUAL_FUNDING_MONTH_YEAR.Value,"MMM yy")= Format(Today(), "MMM yy"),"Black") If you have any more questions, please feel free to let me know. Regards, Bin LongBin Long TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
April 5th, 2012 5:44am

Hi rcdangelo, In your case, please refer to the following steps to get the desired report: In the design surface, right-click on the lines in the chart and select "Series Properties".Click "Fill" page, and then set the "Color" property by using the following expression: =Switch(Format(Fields!ACTUAL_FUNDING_MONTH_YEAR.Value,"MMM yy")= Format(Today(), "MMM yy"),"Black") If you have any more questions, please feel free to let me know. Regards, Bin LongBin Long TechNet Community Support
April 5th, 2012 12:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics