SSRS - How to align the vertical axis of 2 chart areas on the one chart - reporting-services

I have basically loosely followed this link
http://www.angelsbiblog.com/2012/02/improve-data-visualization-in-your-ssrs.html
and made the below linked graph. Its one dataset, I have simply pulled in Gross Profit and Sales fields. Neither are calculated fields. I put them in 2 different chart areas, but then as per that link, made the chart areas the same size so they overlay.
*Apologies for a photobucket link instead of inserted image but I don't have 10 reputation points to be able to insert images.
http://i1375.photobucket.com/albums/ag447/AndrewJacksons/IncomeandProfit_zpse074ac02.jpg
what I want to do, is as illustrated by that inserted green arrow in the graph image, is raise up the Zero line for the Income bars (yellow) to the same level as the Profit/Loss(Blue-Red).
I also want the vertical axis to preferably have the same axis, so i dont have to have that secondary axis on the right.
However the main thing is the graphs sharing their zero line. I have made the Profit bars smaller I width than the yellow bars, so in a month of blue profit, it would simply sit neatly inside the yellow income bar.
I haven't added expenses because it should be obvious what they are by the height differential btw Income to Profit or to the Loss.
Any ideas much appreciated.

I have just experienced this problem, but this page did not solve it.
Dan's answer ("simply set the minimum and maximum values for the vertical axes on both areas manually") came close, but did not solve the problem for me because I needed the axis to be automatically calculated. If the maximum of the two datasets is something like 193,456 then you get that exact value as a label on the axis rather than the sensible value of 200,000.
The solution is to allow SSRS to calculate the axis labels automatically but to trick it by using both sets of data in each chart. Then you hide the data set that you don't want the user to see.
In each chart I made the data series of interest a column chart and the other data series a line chart (without markers), as all you need to do is set the fill color for the line series to None. If you try the same with columns for the other series the invisible columns affect the position of the visible columns even if they have been set to zero width.

Make sure both series in the chart use the Primary Vertical axis. Go into properties for the Income series > Go to "Axes and Chart Area", and make sure that the series uses the primary vertical axis:

Related

SSRS range bar chart, different color when no data

I am looking to change the color in the "gaps" in the range chart that I have built.
Essentially I am trying to build a visualization for the staff to see the availability on bays. The red markings mean the bay is booked, I wanted green then to be in between the red to highlight free bays.
Occupied bays:
I suspect I need to go back to my dataset and add in some date tables to show "null data" to allow a "switch" to work, but I thought someone might know if I could change this without going this way.
An example of the dataset would be:
Following up
here is a screen shot of my output, i added data labels to see if i was going wrong...HOWEVER I also added shadows to my data and my data is actually still there, just hiding behing my secondary bars......
you are right about my data set, i had to add a series grouping to get my appointments all to appear other wise i was just getting the first appointments on the row only to appear....
Following up 2
A further follow up, I have followed #iamdave 's excellent RangeChart.RDL
I have applied my dataset to it but I am now getting the following output, I know I am probably missing something simple, my gut is telling me the cust_id are seperating all the appointments on to seperate lines yet I have both the primary and secondary axis set to "DrawSideBySide = False"
Here is my set up..
here is my latest output, if I could just group all the rows/bars/lines down to the 6 bays it would be great.
You can do this by adding in another data series based on your original dataset, that will require significantly less processing than filling in all your empty periods as suggested by WEI_DBA.
In your dataset, add a new column that returns dense_rank() over (order by BAY) as BayID (order by should be your desired axis label).
This may be best done as a wrapping select statement to preserve the rest of the query logic as is.
In your Range Chart, add in another Values item, with the same Category Field as your current one.
Set the Top Value to 1 and your Bottom Value to 0.
You could also set this to the min and max time of your dataset or the start and end period of your report to only cover the period the Bay was available.
Set it to display on the Secondary Axis for both Vertical and Horizontal axes.
Also select the Do not show this series in a legend option.
Set up the Secondary Vertical Axis in exactly the same way as your Primary Vertical axis.
Set the Secondary Horizontal Axis Minimum and Maximum to the same values as your Bottom and Top above.
Hide both the Secondary Axes.
Select the new Values item and in the Properties window, expand the CustomAttributes section and change DrawSideBySide to False.
If necessary, adjust the order of the Values items in your Chart Data window to make sure the new Range Bar displays underneath your actual data.
Select the original Values item and in the properties sidebar navigate to Data > DataPoint:
Change AxisLabel to =Fields!BAY.Value (Your axis label).
Change Values > X to =Fields!BayID.Value (Value from point 1.).
You should now have a range chart that that displays your data on top of a solid bar, that you can set to any colour you require:

SSRS - Major/minor gridlines spacing

I have an SSRS report with a bar chart with multiple series by CountryName Category group. What I want to do is have gridlines which split each country like below:
However in SSRS the major gridlines seem to interval with the line in the middle of the country name when the grid interval is set to 1 like below:
Can someone point me in the right direction into how to rectify this?
Also is there a way of adding the X axis in SSRS to start from zero like I have in my first graph?
Thanks
You can do it, there is an offset property on the grid lines (horizontal and vertical are separate). Click one one of the gridlines and look in the properties pane. Change the offset to 0.5.
Gives you this.
I'm not sure what you meant about starting from zero on the X-Axis, you have negative values so you'll start from a negative number. If you meant you wantde zero aligned to the middle. You can do that to. You need to set the min and max values of the horizontal axis to the following
Min Value:
=MAX(ABS(Fields!MyValueField.Value), "MyDataSet")*-1
Max Value will be:
=MAX(ABS(Fields!MyValueField.Value), "MyDataSet")
Basically we take the ABSolute largest value and use that as the extent (*-1 for the min value). The problem is that zero might not show so you'll have to play around with the Axis properties maybe to get that working. I'm sure it's possible but I don't have time to test at the moment.
My test data is not great as the number are large

Horizontal Axis Properties

In my chart, Incomprehensible what value of Y axis belong to X axis, what the best way to present the chart clearly. Attached Image.
Have you considered using StripLines?
Taken from this MSDN article
To show vertical strip lines, right-click the horizontal chart axis and click Horizontal Axis Properties.
Select the Use interlacing option. Grey strip lines will appear on your chart.
Applying this to a chart will then alternate the colour for each category on the X axis, such as this. This will make it clearer which columns belong to which X axis category.
Update
For use with a 3D Clustered column chart you will need to set up the Striplines in a more complicated way.
Select your X axis and find StripLines in the properties. Hit the '...' to open a new window.
Add a New Member and set it up as shown in the below image. This is effectively saying show a line for every second number, and offset the stripline by 0.5 of a category.
In my example I have set the BackgroundColour to MidnightBlue also, which gives an output similar to
With this alternating background it should make it clearer for your users to see which columns belong to which category.
Let me know if you need further assistance with this.

SSRS range chart series labels overlap and do not align left

I have built a "gantt" style range chart in SSRS using Narayana Palla's model. I am using date parameters to view the data by a date range - my dataset is museum exhibitions over a number of years. I have opted to use the DrawSideBySide = false custom attribute to display series data but I can not position the series labels as I want. I want them to align left however they align right and overlap with each other. I have tried many different combinations of properties including the smartlabel properties but can not impact on the position of the labels in the series. I have not been able to find a solution in my searching.
I would be happy to have my series displayed using DrawSideBySide = true but the bars are so narrow that neither they nor their labels can be seen. Again I have tried many combinations of properties to set the width of the bars but to no avail. I believe this is due to the number or series in the whole of my chart / dataset.
I would like advice on :
1. How to adjust the position of the labels in the series OR
2. How to fix the width of the series bars so that I can see them on my chart OR
3. If I am right about the size of the data set making the bars miniscule how can I best resolve this - say group on year so that only a limited (and therefore hopefully wide) set of series bars appear at a time from page to page.
Very grateful for any assistance, Sally
In SSRS, for the label overlapping issues, the only way is manually changing the chart area size to make enough space for those labels. Otherwise we have change an appropriate chart type.

SSRS stacked bar chart label position

I am using SQL Server 2012. SSRS
I have a stacked bar charts that includes interest and dividends. I would like to add the sum of these values to the area just above the stacked bar chart. I have tried adjusting various properties for the labels but I can't get the label position to be anywhere but the middle of the stacked bar chart. Any ideas how to get these labels to be just above the stacked bar charts?
I tried the solutions mentioned here and found them cumbersome compared to this gem: http://peltiertech.com/label-totals-on-stacked-charts/
Add a "total" to your dataset (in my case, a percentage)
Add the total series to your stacked bar chart
Change the total series chart type to a line
Hide the line and line markers by setting their fill color to none
Set the Total series to not show in the legend
Set the data point position for your total series to "Top"
Here is my result:
There is not a way to do this with settings.
Here are a couple of links that give you step by step instructions:
http://beyondrelational.com/modules/2/blogs/65/posts/11575/display-total-on-top-of-stacked-chart.aspx
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/654f30c2-ad3a-4b4e-a34f-adf4db6b78d2/stacked-column-chart-total?forum=sqlreportingservices
Basically, the workaround is to create another series or category in your chart that is the totals (which requires updating your dataset to include the totals), make it transparent, and turn data labels on. The MSDN answer says to make it a line chart while the Beyond Relational article leaves it as part of the stacked bar. Either way will work.