Using nulls in Calcs without using NZ

G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top