SSRS - range bar chart highlight today gridline - reporting-services

I've created a range bar chart using SSRS 2008.
It is a date range
StartDate is =DateAdd("yyyy",-2,Today())
EndDate is =DateAdd("yyyy",2,Today())
What I want to achieve is, I want the grid-line for only Today()'s date.
Is there any way to achieve it? I don't know what expressions to give for Interval properties.
Thanks!!
Any help is appreciated.

Use StripLine to achieve this. View the properties for the horizontal axis. Locate StripLines and click on collections. Add a member and set to the following:
Set a Background Color (e.g. Green)
BorderStyle (e.g. Solid)
Interval: Auto
IntervalOffset: =Today().ToOADate
IntervalOffsetType: Days
IntervalType: Years
StripWidth: .5
StripWidthType: Days

I do not think there is direct way achieving your goal. However, you could use calculated value and use it as a tiny bar chart.
Create new calculated value with value of 100
Make sure calculataed field is on top of the values
Put calculated value on Secondary Axis
Change Chart Type to Bar Chart
Adjust the size to your needs. The example below: PointWidth = 0.01
Use Color Expression of the bar value that is similar to below:
=IIF(Format(Fields!timeStart.Value, "Short Date")=Format(Today(),"Short Date"), "Red", "White")
Your new chart should look something like this:

Related

Making Timeline in qliksense

I would like to display a timeline in qlik sense using the Bar Chart Object enter image description hereas follows:
The x-axis represented the months of the year.
The Y-axis represented the years.
The length of the graph will be a date range in the appropriate year and month.
It will look like this:
exaple
How can I do this?
Thanks!
I suggest you use a Pivot Table chart object with a background colour expression set to yellow.
In this example, I calculated the day number of the start date and the duration of the period to be shown in yellow.
The Bar Chart shows the sum of 'DayNumberStartDate' and 'Duration'
Bar Chart

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

ssrs change background color of line chart

I'm developing a report in which I have to highlight a particular period on a line chart.
To be more precise if the dates in the x axis are more than a given date the chart background colour after that date will have to be light green otherwise white.
Here is the expression
=IIF(Fields!Week_Day_Of.Value>Fields!startdate.Value,"LightGreen","#00000000")
I have put the expression in the chart area properties (Fill).
Fields!Week_Day_Of.Value represents the values on the X axis.
Fields!startdate.Value represents the parameter beyond which the cart has to turn light green.
It's not doing anything
As far as I am aware, you cannot fill parts of the chart background like this. Your best bet is to add another column data series on the secondary vertical axis that has a value of 1 or 0 depending on the expression you have above and set the colour of the series to whatever you need. To get the columns wide enough to form a solid block of colour, you will need to set the CustomAttributes -> MinPixelPointWidth property to 100.
You can then set the secondary axis to hidden by right clicking on the chart area and unchecking Show Secondary Vertical Axis and check the Do not show this series in a legend option in the Legend area of the series properties.
Do all this and your chart will look something like this:

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.

Cannot see all the labels on the x asis in an ssrs column chart

I have a column graph as shown below. It shows only a few x axis labels. I want it to show all the x axis labels. Is there a way this can be done ? I tried changing the size of the chart and this doesnt work
Duplicate question:
SSRS chart does not show all labels on Horizontal access
Best answer was:
To fix this, under the "Chart Axis" properties set the Interval value to "=1". Then all the labels will be shown