这是我的条件:
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