1

我有下面提供的 SSRS 表达式。该表达式的问题是最后一列有时会显示#VALUE!第一列的值为NA. 基本上是无法计算。
如何修复此表达式以使其显示正确的数值?一种可能的解决方案是替代0NA但我怎样才能做到这一点?

表达:

=iif(Fields!NumType.Value = "1",iif(reportItems!txt_Current_Filing_Firm.value = "","0",reportItems!txt_Current_Filing_Firm.value),"1") - IIF(Fields!NumType.Value = "1 ",iif(reportitems!txt_Compare_Filing_Firm.value = "","0",reportitems!txt_Compare_Filing_Firm.value),"1")

SSRS 中的电流输出:

Column 1 | Column 2 |  Column 3

NA          3456.00    #VALUE!
NA        347856.00    #VALUE!
NA      98763456.00    #VALUE!
NA         33456.35    #VALUE!

SSRS 中的预期输出:

Column 1 | Column 2 |  Column 3

0          3456.00    -3456.00
0        347856.00    -347856.00
0      98763456.00    -98763456.00
0         33456.35    -33456.35
4

1 回答 1

0

这是解决方案。想分享。我们需要将“NA”替换为 0。它有效!

=iif(Fields!NumType.Value = "1",iif(reportItems!txt_Current_Filing_Firm.value = "" OR reportItems!txt_Current_Filing_Firm.value = "NA","0",reportItems!txt_Current_Filing_Firm.value),"1") - IIF(Fields!NumType.Value = "1",iif(reportItems!txt_Current_Filing_Firm.value = "" OR reportitems!txt_Compare_Filing_Firm.value = "NA","0",reportitems!txt_Compare_Filing_Firm.value),"1")

于 2015-07-18T14:54:00.207 回答