Specific X-Value labels for SSRS scatter plot - reporting-services

I am trying to reproduce this graph
I am having issues setting the x-axis to be the values 1,8,30,50,100,150,200.
I also have no idea how I can get the secondary y-axis to have labels at the defined x-axis.
I took the SQL and created another column called CallOutPoints which just did a simple IIF(X NOT IN (1,8,30,50,100,150,200) then NULL. I then added this but I still can't get the x-axis or y-axis intervals/labels to match what I am after.
My attempt you can see the blue markers which are my calloutpoints, I just want the x-axis to only show ticks at each non-null calloutpoints value and the secondary-y axis to have tickmarks at every non-null calloutpoint.
FRACTION = Red markers
CallOutPoints = Blue Markers

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 colour expression for upward downward trend line chart

I need to make a line chart with the month on horizontal axis and a value on the vertical axis.
I need to colour the line's segments in green if the trend based on the previous month is growing, or in red if the trend is decreasing.
I can't find a way to compare the values grouped by month, and I prefer not to perform this by adding another query from db.
Right-click on the Chart Series (the line of the graph) and select Series Properties..., click Fill on the left then click the fx button to enter and expression for the fill. Let's say your field is called Sales. Use the following expression for the Fill:
=IIF(Fields!Sales.Value >= Previous(Fields!Sales.Value), "Green", "Red")
This worked on my simple test. You may need to aggregate within your query (group by month and sum) for this to work properly.

Position data points in bar graphs in SSRS

I have SSRS reports which has a column chart.
The column chart has 2 value: Actual and Target.
The actual value is displayed as column chart with data labels displayed
and target value as Range column (my data has different targets for different values and would like to display target line for each bar)
The problem which I am running into is that sometimes this target line gets displayed over the data labels and its hard to read the data value.
Is there any way to set these labels to display over the target line when this happens?
This is what is happening right now:
https://drive.google.com/file/d/0Bx_Po7ND9VtOcW8xN3JSNlk5NjQ/view?usp=sharing
Options I tried till now:
1) setting the target values as first series and actual as second series: In this case I don't get to see the target lines as bars gets painted over the target lines.
You can set your Range Series' Fill color to use Transparency to allow the elements behind the line to be seen.
On another note, in the future you may want to do this with a StripLine on the axis rather than creating a new series.
http://blogs.adatis.co.uk/blogs/jeoc/archive/2013/07/23/adding-strip-lines-to-reports.aspx
http://blog.jontav.com/post/7067899413/axis-striplines-in-ssrs-charts

Add additional labels in SSRS Chart

I have a chart in SSRS with horizontal and vertical axis. The chart is as shown in the figure below. I need to add some calculated labels (marked with black) on top of the chart (example is from Excel). How can this be done in SSRS charts?
Labels and smart labels won't work in this case because of the series. It will show values for each group (ex: red, blue, yellow). I just want it once in the totals.
In a nutshell:
Create a second dataset that fetches the values you want for the Data Labels
Select the Series in the Chart and in the Properties pane going to Labels, then set UseValueAsLabel = False
Set the "Label" property to be a LookUp() that fetched the appropriate value from my second dataset
Use the "Visible" property to hide the labels for the other series so that they no longer show.
You can then change the label position to force them at the top of the columns
I found that the best way is to create a new chart (ex: Line Chart)
with value 0.
Then select Secondary Axis for the Horizontal Axis.
Set the Data Point --> Axis Label to whatever you want.

SSRS chart does not show y-axis data labels when values are very small (<1)

I have chart that plots values of Y-axis less than 1 (0.1, 0.24, etc).
When the chart is built, Y-axis label just shows 0 at the origin and no other values along the axis.
My solution was a little ugly. Data series labels show up with the correct % signs, but the % signs do not show up on the Y axis.
Y axis: set Y axis range from 1-100 (or 1-120 so there is room to display the data labels that say 100%) Make sure you set your tick marks to Auto or a number between 1 and 100, otherwise you'll get one long bar of tick marks running all the way up the y axis.
Data series: on the series tab, change your Value Field formula to multiply your data series by 100.
Data series labels: on the series data label properties window > general tab, copy the formula from your data series Value Field into the Label Data value field. round it to 0 decimal points and add &"%" to the end to concatenate a percent to the end of it.
That way the right numbers display for my data series and my Y axis, but the % just doesn't show up on the Y axis. not perfect yet. and too much work.
I just tested this and it seems this happens in SSRS 2005 and not 2008. You can fix this by right clicking on your chart and going to properties. It should bring up the full Chart Properties, go to the Y Axis tab and set Major Gridlines at a value like .25/.5 or whatever you want.