What expression do I need to get a date field(DateAdded) to turn red 3 days after "today"? (ex: Today is 3/13. The field would turn red on 3/16 and stay red)
I think this is what you need. Assuming stay red is keep it red if the difference is 3 days or more.
=IIF(Datediff(DateInterval.Day,Fields!YourField.Value,Today)>=3,"Red","Transparent")
DateDiff function returns the difference between two dates in terms of a specific interval of time.
Related
I am trying to get my chart to only show the month name. I have changed the horizontal axis options to do that but they are all duplicated. Can anyone tell me how I can get this set up to only show each month one time?
Here is the chart without any formatting:
It correctly shows the 4 data points.
I then go to the Horizontal Axis properties, change it to number and then select the MMM for the three character month name which correctly displays:
when I run the report after making that change I get an extra month (december) and all the month names are duplicated:
What do I need to do so that I only get Jan - Apr one time on my horizontal axis?
Thanks for any suggestions!
Leslie
edit: Here is the raw data:
I have tried changing the interval but have seen no effect on the output. I have tried unselecting the "Always include zero" option to get rid of december but that didn't work either.
edit 2: I said above there was no effect when I changed the axis interval to 1, actually that results in many entries for the Year-Month data in the axis area.
Right click on horizontal axis, select axis property, from the "Axis range and interval", for interval, type in "1" (without quotes), for interval type, select "Month", then hit OK. enter image description here
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.
New to SSRS. I'd like the lines to show up red if they are late from the current date(due 3/16/16, current date 3/31/16) and yellow if they are two days away from being due. Ideally all of these dates would currently be red
Try using the following expression in the background color property of the date cell.
=IIF(
Fields!DueDate.Value<Today(),"Red","Yellow"
)
If due date is less than Today date it will color in red the background color of the cell. Otherwise it will color in yellow.
UPDATE: Three different colors based on the DueDate.
This is the logic flow:
Due Date < Today. It is due so it will be Red
Due Date - Today <= 2 It will be due in two days, so it will be Yellow
Due Date - Today > 2 It will be due in three days or more, so it will be Green
Expression:
=Switch(
Fields!DueDate.Value<Today(),"Red",
DateDiff(DateInterval.Day,Today(),Fields!DueDate.Value)<=2,"Yellow",
true,"Green"
)
Let me know if this helps.
im looking to add some arrow indicators to compare 2 values within my Matrix. Current week v Last week.
I'm getting confused on where to put my expression which I'm currently using (for a Red arrow going down)
=Fields!COUNT_Signed.Value<Fields!COUNT_Signed_lw.Value
I have entered this into the Start Expr and have -1 in the End Expr.
all I'm getting is Green arrows going up as I'm also using > for green
Any help would be grateful
I think you have Fields!COUNT_Signed_lw.Value as the Value and you just need to use =Fields!COUNT_Signed_lw.Value as your END and -1 as the START.
The START and END values are the range of values to compare the Value with.
In this example, the indicator would be RED if ADMIT is Between 0 and 33.
MSDN - Indicators
I will start with a picture (I know it's a bit difficult to see):
As you can see in the report I have three groups:
Organization level 1 - with some grade and indicator
Second group grouped by the entity type (person of organization) and each one has an average grade with indicator
The third section is a list of persons of organization with their grades and indicators
The indicators are set follows:
The problem is that sometimes the indicator shows the color yellow when the grade is 100 (the indicator should show the color green).
I have checked the following:
The grade that returns is 100 but the indicator still shows the color yellow
I have tried to create c color expression and the result was the same.
I have started to think that this is a bug of Report builder 3 / Reporting services
I have a few suggestions.
Can you add decimals to the output to see if the yellow 100 is over 100? As these are averages this may effect the upper limit.
Also try putting the colours in order of green to red.
Edit:
Something doesn't match up in your report and / or data as the green "56" acording to tat value should be red, and some of the yellows are to be red.
You need to check the value you print next to the traffic light as these values are not in any way reflective of the vaues you are getting out for the indicators.
Also check the data type on the grade field or may be add a convert funcrtion, say cint() to your expression.
Your fields should be 0 to .60, .60 to .85, .85 to 1 as it looks like the field you are basing this on is an avg.
You can give a try by Changing the range for the yellow and green as
Yellow: 61 to 85
Green : 86 to 100