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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum Total in a Report

Status
Not open for further replies.

scoobypaw

Technical User
Jun 8, 2005
20
US
I am trying to total a status field which is based off a lag time formula which is then turned into a status (Early, on time, late, or pending)

I am trying to calculate how many early, on times, lates, and pendings I have for each quarter.
This is the formula I am using:

=Sum([Status2]="On Time")

It is giving me the right # , however if it is anything other than qty 0 it returns the number as a negative.
So if there are 3 records are are "on time" it returns -3.

What is wrong with my formula ?

Thanks for your help
 
try
=Sum(IIf([Status2]="On Time",1,0))
 
Why not this ?
=Abs(Sum([Status2]="On Time"))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It's translating it to a boolean expression, where true evaluates to -1, try

[tt]=abs(Sum([Status2]="On Time"))[/tt]

Roy-Vidar
 
IT WORKED !
=abs(Sum([Status2]="On Time"))

I thought I tried that already. Apparently not =:)

Thanks guys. You are GREAT help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top