posted 1/26/2010 by MikeDavis - Views: [14749]
If you want to create a column chart and have a line across the top showing the numbers in two different ways, it is easy to do in SSRS 2008. Just drag over the data into the data field twice. Right click on the data field on change the chart type to line and the other to column.
Here is a table I used to show this.
I created a Column chart and dragged over the date and numbers fields as shown.
Notice I placed the Number data in the data field twice. Then I right clicked on the data field and select the change chart type option. Then selected line chart.
After I select line chart and click OK the chart looks like the image below. It now has columns and lines on the same chart.
If you have multiple Series and only want to show for one series in the chart you will need alter the visibility. Here is the chart with a new columns I will use for the series.
Refresh the data set and drag over the rep to the series field.
Right Click on the data field and go to series properties...
Then set the visibility expression. Remember to set it to Not equal to, this is setting who to hide, not who to show.
The Chart will show multiple columns and a single line.
Hi Mike,
do you know if it is possible to hide a trend line in SSRS 2005 in the same way that you explained here?
Thank you!
I believe the series in 2005 had a visiblity property. If so, then yes, you should be able to hide it. Anything with a visibility property can be hidden.
Mike,
I have a situation similar to your example, but a little differant. I have a situation where by (to make it simple) I have 3 reps and need a total, however I only need a line graph. My "numbers" is money or sales. I want 4 lines, one for each "rep" and a total line. I have made 4 series of Sum(sales) and using a visibility expression in 3 of the 4 similar to how you do it here and then a total that does not have anything hidden to get the total. I, also, have an axis of time, which the graph should give the amount of sales by rep and a total across a span of time. 1. Is there a way to pull the values of "rep" without hard coding a series for each? 2. Mine looks fine in design with my 4 lines and a legend for each "rep" and a total, which is what I would think it would be, however when I preview it, I only get 1 rep and the total. Do you have an idea of what I am missing?
JIMSS, I would not hard code in the Rep for those. I would create a series for Rep to get each rep. Then in the T-SQL you can create a "total rep" in the data source to show the total.
Thank you, that worked.