我遇到一个错误,试图除以零,但不知道如何解决。这是我用于指标的代码。
=IIF(Sum(IIF(Fields!Year.Value = Year(now), Fields!Amount.Value, Nothing)) = Nothing Or Sum(IIF(Fields!Year.Value =
Year(now) - 1
, Fields!Amount.Value, Nothing)) = Nothing, 0
, ((Sum(IIF(Fields!Year.Value = Year(now)
, Fields!Amount.Value, Nothing)) - Sum(IIF(Fields!Year.Value = Year(now) - 1
, Fields!Amount.Value, Nothing))) / Sum(IIF(Fields!Year.Value = Year(now) - 1
, Fields!Amount.Value, Nothing))))