Abs Formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I have a formula on my report in a text box that just shows the total
delay for a crew by using the supervisors name. This information isnt stored
anywhere its just to show a percent on the report! the formula is:

=Abs(Sum([Supervisor]=â€Chad Zablackasâ€)*([DT REGULAR]+[DT MAINTENANCE]+[DT
Reason 1]+[DT Reason 2])/Abs(Sum([Supervisor]="Chad Zablackas")*[EMPLOYEE
TIME]))

I keep getting an error saying invalid syntax: Your may have entered an
operand without an operator? What am I missing in my formula? Thanks!
 
Chad,

It looks to me like you may have the parentheses in the wrong place.
Try like this...
=Abs(Sum(([Supervisor]=”Chad Zablackas”)*([DT REGULAR]+[DT
MAINTENANCE]+[DT Reason 1]+[DT Reason 2])))/Abs(Sum(([Supervisor]="Chad
Zablackas")*[EMPLOYEE TIME]))

I also notice you have ” and " within the expression. Change the ”s to "s.

It also seems to me that if none of the records included have
[Supervisor]="Chad Zablackas", you will get a 'division by 0' error.
 
Steve, Thanks for the reply! I tried the formula you gave and I am still
getting an error saying invalid syntax: Your may have entered an operand
without an operator? Also what do you mean change the "s to "s?

Thanks,
Chad

Steve Schapel said:
Chad,

It looks to me like you may have the parentheses in the wrong place.
Try like this...
=Abs(Sum(([Supervisor]=â€Chad Zablackasâ€)*([DT REGULAR]+[DT
MAINTENANCE]+[DT Reason 1]+[DT Reason 2])))/Abs(Sum(([Supervisor]="Chad
Zablackas")*[EMPLOYEE TIME]))

I also notice you have †and " within the expression. Change the â€s to "s.

It also seems to me that if none of the records included have
[Supervisor]="Chad Zablackas", you will get a 'division by 0' error.

--
Steve Schapel, Microsoft Access MVP
Hello, I have a formula on my report in a text box that just shows the total
delay for a crew by using the supervisors name. This information isnt stored
anywhere its just to show a percent on the report! the formula is:

=Abs(Sum([Supervisor]=â€Chad Zablackasâ€)*([DT REGULAR]+[DT MAINTENANCE]+[DT
Reason 1]+[DT Reason 2])/Abs(Sum([Supervisor]="Chad Zablackas")*[EMPLOYEE
TIME]))

I keep getting an error saying invalid syntax: Your may have entered an
operand without an operator? What am I missing in my formula? Thanks!
 
Here is what some of the report looks like if that helps!


MACHINE DELAY
SUPERVISOR EMPLOYEE HOURS WORKED DT 1 DT 2 MAINT REG
Supervisor Name Employees Name 8 0.00 0.00
0.00 2.05
Supervisor Name Employees Name 8 0.00 0.00
0.00 2.25
Supervisor Name Employees Name 8 0.25 0.00
0.00 1.98
Supervisor Name Employees Name 8 0.00 0.00
0.00 2.45
 
Chad,

I'm sorry, at this stage I can't see anything wrong with the syntax.

In your original post, the quote chartacters around the first "Chad
Zablackas" were not regular text quotes. It may not appeart that way to
you, I guess it depends on the formatting options in your newsreader,
among other things.

So, all I can suggest is trying again. But please manually type the
whole expression into the textbox's Control Source property, rather than
copy/paste or anything like that.
 
Back
Top