值表达式包含错误:试图除以零

时间:2019-03-23 19:02:17

标签: divide-by-zero

我遇到一个错误,试图除以零,但不知道如何解决。这是我用于指标的代码。

=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))))

0 个答案:

没有答案