Target reference for each bar in Spotfire - bar-chart

In Spotfire:
Is it possible to show target value reference line for each bar in a bar chart.
A way around that i am doing now is using combination chart. Refer screenshot.
The problem here is that now i can not define a color by property to color bars using rules.

I don't believe you can do it automatically without scripting but here is an example of how to do it by hand.
Right click on your bar chart and go to the Lines & Curves section:
Here you can see I've added 4 lines based on percentage of the data.
You can do this or add lines of set values using the Add button in the top right and selecting Horizontal Line.
Notice I've added the line name as the description of the percentage it is, hovering over will show an actual value so it may better to do this if it isn't clear what the value represents.
This is what it produces:
To make it better match your question I've added 2 more employees and coloured by employee instead, I've also set fixed targets for each person rather than percentages and renamed them to make sure it is clear which line applies to which person in case the colour isn't enough.
Using the Settings -> Appearance section back in the first picture change the colour of the lines to match the fields they represent.
Like I said at the start you should be able to create a script to do this for you but that is another question.

Related

SSRS Indicator arrow percent change

I am trying to apply an indicator arrow that feeds from a variance Percentage as per screenshot. The only options available within the indicator require me to set a start and end, however. The column that I wish to reference merely shows % change. This can be positive 0.9% for example or negative -2.3%. When working with the percentage change in this way how do you apply a start and end? Ideally, I would like simply to say green up arrow if >0 or red down arrow if less than 0. (right pointing orange arrow if 0 to show no change). Have been google(ing) for a couple of hours now and cannot find a working solution.
The arrows do not work as all currently show Green and up.
This looks like it will solve your issue:
MSDN
It basically doesn't use the values but has an expression for the colour instead.

SSRS - Indicator and value in same cell?

I have created a Directional indicator (Green up arrow and Red down arrow) in my SSRS report, referring to the value of the column next to it. This all works ok:
However, I really want the indicator and the value to be in the same cell, like Excel can:
A Google found the following article , where the last post suggest it is possible using the following syntax:
=Format(Fields!Column1.Value, "Format") + " " + "Indicator"
I assume "Indicator" refers to the name I gave to my Direction indicator, but I can't get it to work..
I have read that by using border formatting I can get my two cells to look like one, but I would ideally like it all to be in one.
Any thoughts appreciated!
Mark
I would do this by placing a Rectangle inside of the cell and place your indicator along with another text box inside the rectangle. The downside to this is (depending on how you align the items in the rectangle) the formatting may cause split cells in excel exports.
Ross's method will work and there are alternatives..
The article you referenced was a text indicator not an image (from what I could tell).
You could do something similar by simply adding a a placeholder in the cell (right-click inside the cell and click "create placeholder"). You can then set the font and colour independently from the rest of the cell.
You could use a common font such as wingdings to get arrows and then the value and color properties would be expressions to show the correct 'character' (arrow) and the correct colour.

Report Builder 3.0, breaking out data field for Bar Chart

I'm using Report Builder 3.0 and trying to figure out if i can break out one datafield with the few values I need for my bar chart. The data looks like this;
[[44278,47411],[{"name":"$41,000/year goal","y":41000}],["",""]]
I want bar 1 to be the 44,278 value, bar 2 to be the 47,411 value and the 41000 to be embedded as a goal. I've attached a screenshot of how we have it working with other grid and charting products, but this is going to be embedded in a much more in-depth SSRS report. Any sort of help would be great as i'm new to the whole SSRS reporting system.
You can do this with a custom StripLine:
Right-click the vertical chart axis and click Vertical Axis Properties.
The axis properties are displayed in the Properties window.
In the Appearance section of the Properties pane, for the StripLines property, click the Edit Collection (…) button to open the ChartStripLine Collection Editor.
Click Add to add a new strip line to the collection.
Click StripWidth to specify the width of the strip line. If your goals will fluctuate, you might want to make it relative to your Goal e.g. =Fields!YourGoalField.Value/100
Set the StripWidthType property to Number.
Set the InvervalOffset value to =Fields!YourGoalField.Value.
Set the IntervalOffsetType value to Number.
More on StripeLines: http://technet.microsoft.com/en-us/library/dd239316.aspx
EDIT To get the Goal Label outside the Chart Area as depicted, we have to do a sort of hack:
Delete the StripLine Title as there is no way to get that outside the Chart Area.
Right Click the Chart and select Add New Title.
On your new Chart Title's Properties Pane
Set the Docking Position to Right Center.
Set the TextOrientation to Horizontal.
Adjust the Font style and color to match your spec.
Set the Caption Expression to =Format(Fields!YourGoal.Value,"$0,000") & "/year goal"
Here is where the hack comes in. In order to get the Goal label to line up with the Goal Line, you need to add a certain number of carriage return/line feeds to your Caption Expression. To do this, append & vbcrlf to the Caption Expression a bunch of times and keep testing until it lines up. You might also want to adjust the DockingOffset property to move the Label closer to the Chart Area.

In SSRS how to conditionally change the colour of a datalabel font on a chart when it appears on the bar

I have created a bar chart that shows values on data labels.
The Data label is placed outside the bar
But in some cases the label appears on the bar where the bar is too long.
In this scenario I would like to conditionally change the font/colour of the data label so that it's more visible.
However I can't see a way to dynamically determine where the label has been placed.
What I can think of is this. You can change the background/font color of all those series labels who's value lies in the range of 95%-100% of the maximum "Value". To be exactly precise as to what should be the threshold to change the bg/font color seems a daunting task, but you could play around with test data.
For writing the expression to change the font color,I would first change the dataset and add a column on the lines of PercOfMax. This column can be calculated easily in the dataset by using basic aggregate functions.
Then you need to go to the Chart Series Label properties-->Color and write the expression on the lines of -
=IIF(Fields!PercOfMax.Value>=95, "YELLOW", "BLACK")
As I said, you might need to do some more research to finalize the value of this threshold(which I am assuming to be 95).
Another solution to this problem is to use fill colour of the label and set its background to a bright colour (e.g. colour), and leave the font colour of the label black. Thus you can always see the label, and there is no difference when it's outside of the bar.

Implementing Target lines, in SSRS column Charts

I have a column graph, that shows a trend of consumption over time,
The y-axis being consumption and x-axis being time in month,
I have to implement a target consumption.
I implemented a target, by adding data field with a Line chart type, this is a constant, and will just display a horizontal line.
The problem i am facing is, if there is only one month, the line disappears? is there a way not to have it disappear, or is there a better way to add line target in column charts in SSRS
I am using SSRS 2008
Adding a StripLine may do what you want. They are a little hard to find, but here is how:
1) Make sure that the properties window is open beforehand. If it isn't, either hit F4 or go to the View Menu -> Properties Window.
2) Left click on your vertical axis to select it.
3) Select the StripLines entry in the Properties Window and click the ellipsis:
4) Click Add
5) Starting off, the stripline is invisible, so it can be a bit hard to adjust. :). To make it visible as a thin line, set BorderStyle to "Solid". Adjust the color with BorderColor and width with BorderWidth (not StripWidth). While positioning the line, I like to set the color to something obnoxious and make it wide to make it easier to spot.
5) To position it, you want to set the IntervalOffsetType to match the type of your interval you have set on the vertical axis. Then IntervalOffset to the y-value of where you want your target line to appear. Since you only want 1 line to appear and not repeat, you must keep Interval set to auto.
6) Once you get it positioned, make final adjustments to the appearance.
I had a hard time finding it for my Databar. I stumbled onto this...
Make sure Properties toolbar is visible
Click the Databar to highlight
Find ChartAreas in properties toolbar, click to open ChartAreas dialog
Find ValueAxes in ChartAreas dialog, click to open ChartAxis dialog
Find StripLines in ChartAxis dialog, click to open ChartStripLine dialog
I was playing around a little earlier, and i noticed that i can change the interval for the major and minor gridlines, AND change the format for the lines. I had the bright idea of making the minor lines look like the major ones i had and format the major lines to look like a target line. I don't know if this'll work for you buy you could try it.