Hello,
I want to create pie chart report which will display bug counts according to their age i.e. within last month, 1-3 month old and 3+ month ago.
I have got dataset (TFS2010Olap as data source) which is displaying 2 columns, System_CreatedDate and WorkItem_count. I want to create group expression at chart level so it categories source data and display on chart accordingly.
I am using this expression in categoryGroup of pie chart:
=iif(CDate(Fields!System_CreatedDate.Value) > DateAdd("m", -1, now), "Within Previous Month", iif(CDate(Fields!System_CreatedDate.Value) > DateAdd("m", -3, now), "1-3 Months Old", "3+ Months Old"))
but I am getting error: Conversion from string "22/01/2012" to type "Date" is not valid. I tried to do with function"DateDiff" but getting same error. Please let me know what I am missing or wrong in the expression? I had a look at MSDN post with title "SSRS Report to calculate Bug Age" but getting this date conversion problem.
I tried to format date as well but getting format error again:
=iif(cdate(format((Fields!System_CreatedDate.Value),"dd/MM/yyyy")) > format(DateAdd("m", -1, now),"dd/MM/yyyy"), "Within Previous Month", iif(cdate(format((Fields!System_CreatedDate.Value),"dd/MM/yyyy")) > format(DateAdd("m", -3, now),"dd/MM/yyyy"), "1-3 Months Old", "3+ Months Old"))