0

Getting a NaN error. My original statement is:

=SUM(Fields!Outstanding_Commitments.Value/Fields!Conversion.Value, "Cost") 

After getting the NaN error, i changed my code to the following:

=IIF(Double.IsNAN(SUM(Fields!Outstanding_Commitments.Value/Fields!Conversion.Value, "Cost"))
,0,
SUM(Fields!Outstanding_Commitments.Value/Fields!Conversion.Value, "Cost"))

Using the second part doesnt provide me with any values at all. Something isn't right.

Thanks in advance

Ocaso Protal
  • 19,362
  • 8
  • 76
  • 83
Ron McArthur
  • 63
  • 1
  • 2
  • 10

1 Answers1

0

Try the expression below

=SUM(
Iif(Fields!Conversion.Value=0,0,Fields!Outstanding_Commitments.Value)
/
Iif(Fields!Conversion.Value=0,1,Fields!Conversion.Value)
, "Cost") 
niktrs
  • 9,858
  • 1
  • 30
  • 30