Using nulls in Calcs without using NZ

C

Chip

I have the following calculation which comes out wrong due to the us eof NZ.

AvgMktValue:
IIf([AssetType]="Swap",(NZ([Beginning_PAR],0)+NZ([End_PAR],0)+NZ([BegUnrealizedGains/Losses],0)+NZ([EndUnrealizedGains/Losses],0)+NZ([BegAccruedInterest],0)+NZ([EndAccruedInterest],0))/2,(NZ([BegMarketValueSettled],0)+NZ([EndMarketValueSettled],0)+NZ([BegAccruedInterest],0)+NZ([EndAccruedInterest],0))/2)

Since any one of the fields could be null, I'm not sure how to get around
it. My only thought was to do intermediate calcs between each begin and end
value using NZ then redoing this one by adding the new fields divided by 2.

Anyone see an easier solution?
 
D

Douglas J. Steele

I don't see anything wrong with your expression. What problem are you
experiencing?
 
Top