我有一张图表,用于比较过去7天(包括当天)和之前7天的交易。
但是,我注意到有时在白天,日期的顺序是不正确的。 当我再次打开报告时,这是正确的,没有我做任何事来解决它。
上图是在星期天早上创建的,周六和周五的值都会切换。由于是星期天早上,图表应该从星期一开始,到周日结束。
稍后,它显示应该。
数据如下(遗憾的是,我只能在图表正确显示时提取数据。)图中有2个产品组合在一起。
Brand Date DepositAmount DayOfWeek WeekSeries
B 10/02/2014 1630 Monday Previous Week
A 11/02/2014 13717 Tuesday Previous Week
B 12/02/2014 2460 Wednesday Previous Week
A 13/02/2014 4941 Thursday Previous Week
A 18/02/2014 9194 Tuesday Current Week
B 19/02/2014 1947 Wednesday Current Week
A 20/02/2014 4185 Thursday Current Week
B 21/02/2014 273 Friday Current Week
A 22/02/2014 2521 Saturday Current Week
B 22/02/2014 1118 Saturday Current Week
A 23/02/2014 1438 Sunday Current Week
B 23/02/2014 105 Sunday Current Week
A 14/02/2014 4958 Friday Previous Week
B 14/02/2014 1023 Friday Previous Week
A 15/02/2014 2465 Saturday Previous Week
B 15/02/2014 1208 Saturday Previous Week
A 16/02/2014 3495 Sunday Previous Week
B 16/02/2014 680 Sunday Previous Week
A 17/02/2014 2726 Monday Current Week
B 17/02/2014 1177 Monday Current Week
A 10/02/2014 4938 Monday Previous Week
B 11/02/2014 1543 Tuesday Previous Week
A 12/02/2014 7891 Wednesday Previous Week
B 13/02/2014 5490 Thursday Previous Week
B 18/02/2014 4726 Tuesday Current Week
A 19/02/2014 9009 Wednesday Current Week
B 20/02/2014 459 Thursday Current Week
A 21/02/2014 6012 Friday Current Week
在SSRS中,图表定义如下:
类别组:DayOfWeek(按日期(A到z)排序)
系列组:WeekSeries(按WeekSeries(A到Z)排序)。
可能导致此问题的任何想法?
答案 0 :(得分:0)
我认为问题出在您的类别组排序中 - 您按DayOfWeek进行分组,然后按日期排序,该日期具有多个值。星期五的第一行可以随机获得当前周日期或上周日期。
要解决这个问题,对于类别组排序,我会得到一个“Relative DayOfWeek”值,如:
= Abs(DateDiff(DateInterval.Day,Today(),Iif(Fields!WeekSeries.Value =“Current Week”,Fields!Date.Value,DateAdd(DateInterval.Day,7,Fields!Date.Value)) )