I have a chart that shows number of search hits for various time frames (e.g. Last Week, Last Month, Last Year etc.). For short time intervals chart is displayed on day-by-day basis, but for long intervals doing it on day-by-day basis makes the chart almost unreadable (as there's a lot of data overlaping). Thus i needed a way of alternating the day-by-day with week-by-week representation on the same chart, depending on the "longitivity" of the time frame selected.
In order to solve the problem I have changed the grouping for chart (category fields) to vary depending on the time frame selected:
=IIf((Parameters!TimeFrame.Value = "L6" or Parameters!TimeFrame.Value = "LY"), DateAdd("d", -1 * DatePart("w", Fields!SearchDate.Value) + 1, Fields!SearchDate.Value), Fields!SearchDate.Value) - with the same expression in Label field. Where L6 and LY correspond to time frames - Last 6 Months and Last Year - respectively. This expression assures that in cases re L6 and LY are selected - grouping by week is applied, otherwise grouping by day is in place.
Thursday, September 6, 2007
Subscribe to:
Posts (Atom)