1

I have a field in a matrix that has some nulls. I would like to replace all the nulls with 0s. This is the expression I currently have in the field:

=Sum(IIf(Code.isVM(Fields!deviceType.Value), 0, 1))

I'm guessing I have to have an IsNothing expression in there but I can't figure out how to add this with this existing expression.

Pedram
  • 6,256
  • 10
  • 65
  • 87
JimMatz
  • 45
  • 1
  • 4

2 Answers2

0

I recall testing for length greater than 0 worked well.

=IIf(Len(Fields!deviceType.Value) > 0, Fields!deviceType.Value, 0)
Biscuits
  • 1,767
  • 1
  • 14
  • 22
0

How about:

=Iif(
   Sum(IIf(Code.isVM(Fields!deviceType.Value), 0, 1)) Is Nothing, 
   0, 
   Sum(IIf(Code.isVM(Fields!deviceType.Value), 0, 1))
)
Nathan Griffiths
  • 12,277
  • 2
  • 34
  • 51
  • Thanks both for the response! Nathan yours worked perfectly for what I was looking for. Thanks!!! – JimMatz Mar 30 '15 at 17:12