Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting null value

Status
Not open for further replies.

jtr9999

MIS
Jan 25, 2008
27
US
thread767-1596997

lbass
The formula's you posted in the thread referenced helped me in my report but I have a question why my original formula didn't work when I did a count on it. I show termination date for a person if they have a termination date and are not active. When I do a count on my original formula it counts every record. Why does it do that?

ORIGINAL FORMULA
If {TABLE.EESTATCD}<>'A' and not isnull({TABLE.TERMDATE}) then
totext({TABLE.TERMDATE})
else
''

WORKING FORMULA
If {TABLE.EESTATCD}<>'A' and not isnull({TABLE.TERMDATE}) then
totext({TABLE.TERMDATE})
else
totext({@null})
 
When you insert a count on a conditional formula, it counts every time the formula executes, not how many times a row meets the criteria. In the first formula, the formula executes when the result is "", and so is counted, but nulls (as in the second formula) are not.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top