×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help with Null Values

Help with Null Values

Help with Null Values

(OP)
I have a formula called "EstExp" which is the following: {SUBPROJECT_SPENDPLAN_LINES.Q1_BUDGET_AMT}+{SUBPROJECT_SPENDPLAN_LINES.Q2_BUDGET_AMT}+{SUBPROJECT_SPENDPLAN_LINES.Q3_BUDGET_AMT}+{SUBPROJECT_SPENDPLAN_LINES.Q4_BUDGET_AMT}.  I then do a running total on "EstExp".  In some cases I get a blank record, so I'm assuming that for some of these fields there isn't a record to evaluate.  I've tried using IsNull, but can't seem to get it right.  Can anyone help.

Thanks,
Sherry

RE: Help with Null Values

If you have any null value in group of numbers you are adding, you get a null as a result.  This is because a null value is the logical equivalent of "unknown", so any number added to an "unknown" number results in an "unknown" value.
If you want to treat nulls as zeros, then the following formula will do that.

NumberVar YearBudget := 0 ;
If Not IsNull({SUBPROJECT_SPENDPLAN_LINES.Q1_BUDGET_AMT}) then YearBudget := YearBudget + {SUBPROJECT_SPENDPLAN_LINES.Q1_BUDGET_AMT} ;
If Not IsNull({SUBPROJECT_SPENDPLAN_LINES.Q2_BUDGET_AMT}) then YearBudget := YearBudget + {SUBPROJECT_SPENDPLAN_LINES.Q2_BUDGET_AMT} ;
If Not IsNull({SUBPROJECT_SPENDPLAN_LINES.Q3_BUDGET_AMT}) then YearBudget := YearBudget + {SUBPROJECT_SPENDPLAN_LINES.Q3_BUDGET_AMT} ;
If Not IsNull({SUBPROJECT_SPENDPLAN_LINES.Q4_BUDGET_AMT}) then YearBudget := YearBudget + {SUBPROJECT_SPENDPLAN_LINES.Q4_BUDGET_AMT} ;
YearBudget

Malcolm Wynden
wynden@island.dot.net

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close