Range chart for timeline grouped by years

  • I am building a timeline using SSRS range chart for tasks that sometimes have a duration one or more years. I would like to display the tasks by a year so that users can scroll from year to year. The chart horizontal axis maximum and minimum are based on the parameters. I have put my range chart into a matrix grouped on start year. Tasks that are longer than one year are cut off at the end of the start year period and do not show up in the following year. I can't work out how to group so that a task with a start date in one year and a end date in the next year will show over both periods. I think I need a grouping expression to allow tasks to show up in two groups (start and end years) but can't work this out. I have tried an IIF statement but get caught up in the intricacies of this. Below is my attempt:

    =IIF(Fields!StartDate.Value >= CDate("1 Jan" & Str(Year(Fields!StartDate.Value))) AND (Fields!EndDate.Value <= CDate("31 Dec" & Str(Year(Fields!EndDate.Value)))),

    DatePart("yyyy", Fields!StartDate.Value), IIF (Fields!StartDate.Value <= CDate("1 Jan" & Str(Year(Fields!EndDate.Value))) ,DatePart ("yyyy", Fields!EndDate.Value))

    Hope you can help

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply