标签: reporting-services average ssrs-2008-r2
=SUM(IIF(Fields!WeekEnding.Value)>= DATEADD(Week,-17,GETDATE()),Fields!Hours.Value / 17)
我想找到所有小时数的总和,在过去的17周内,然后除以17,找出每周的平均小时数。
提前致谢
答案 0 :(得分:0)
SUM(IIF(Fields!WeekEnding.Value >= DATEADD(Week,-17,GETDATE()),Fields!Hours.Value,0) )/17