I'm trying to create a grouped category on a bar chart in SSRS.
My query is:
select distinct filedate, transaction_date, duedate, event_instance, event_name, eventstatus
(datediff(DD, duedate, filedate)+1) as DaysAged,
-(DATEDIFF(WK, duedate, filedate) *2)
-(case when DATENAME(DW, duedate) = 'sunday' then 1 else 0 end)
-(case when DATENAME(DW, FileDate) = 'saturday' then 1 else 0 end) as wkends
from MY TABLE where filedate =
(select MAX(filedate) from MY TABLE)
and FileDate > duedate
In Reporting Services I created a calculated field to sum up "Daysaged" less the "wkends" value. This gives me how many days past the due date. On my bar chart, I want to have a bar for 0-5 days, 5-10 days, 11-15 days and 16+ days.
I've tried the following expression, but I'm not able to sort the columns or bars on the graph.
=IIf(Fields!Total_Aged_Days.Value<=5,"0-5 Days", IIF(Fields!Total_Aged_Days.Value<=10,"6-10 Days", IIF(Fields!Total_Aged_Days.Value<=15,"11-15 Days", "16+ Days")))
Thanks in advance for your help. I'm using SSRS 2008.