GroupBy计入SSRS

时间:2017-02-14 12:41:08

标签: sql sql-server tsql reporting-services

这是我的条件:

when AvgByWeek = 0
then 0 for the group of YardPerWeek
else 1

我的表达式会不断计算组YardPerWeek内的行数,但我想只计算YardPerWeek的数量?请参见下面的附图

=iif(SUM(iif(sum(Fields!EnoughWeight.Value,"YardPerWeek")>=(Fields!ServiceFrequency.Value)
            ,(Fields!AvgByDay.Value*Fields!ServiceFrequency.Value)
              /sum(Fields!EnoughWeight.Value,"YardPerWeek")
            ,0
            )
         ) = 0
    ,0
    ,countdistinct(Fields!YardPerWeek.Value)
    )

GroupByYardPerWeekAggregate

0 个答案:

没有答案