Dynamic coloring for char series in SSRS

Dynamic coloring for char series in SSRS

This post helps in Dynamic coloring for char series in SSRS. We had a requirement to collect SQL Server job execution timings and showcase in a SSRS report using a bar chart. For the longest running times the bar should be colored with RED and the remaining all can be in green color.

Once you placed the Chart into your report. Go to the Chart and right click on any Bar

–> Select Series Properties –> Go to Fill Tab –> Click on Expression –> Place the below code

=IIf(Fields!RunDuration.Value>= Max(Fields!RunDuration.Value, “DataSet1”) And Min(Fields!RunDuration.Value, “DataSet1”)<> Max(Fields!RunDuration.Value, “DataSet1”) And Min(Fields!RunDuration.Value, “DataSet1”)>0, “Red”,”Green”)

**** Here RunDuration is the column name on which the series is being changed.

**** If the RunDuration of a job is same then all the bars in the series are shown as Green

Dynamic coloring for char series in SSRS

**** The highest execution bar is colored as Red…..

Dynamic coloring for char series in SSRS
Dynamic coloring for char series in SSRS

 

Posted in MSBI, SSRS | Tagged , , | Leave a comment

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz