Calculating Absolute Value

  • Thread starter Thread starter lil lam
  • Start date Start date
L

lil lam

Hi,

I am working on a report in Access. I just created a Total in the
Report Header to calculate the sum of one of the fields. However, I
just realized, it doesnt calculate absolute value. Is there a formula
I can put somewhere in the report so that the Total calculates only
absolute value?

Thank you.
 
The Abs function returns the absolute value of a number. So you can wrap your
calculation in the Abs function.

Abs(-1+2-3) will return 2
Abs(-5*10) will return 50

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
The Abs function returns the absolute value of a number.  So you can wrap your
calculation in the Abs function.

   Abs(-1+2-3) will return 2
   Abs(-5*10) will return 50

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Instead of calculating the values to get the sum in absolute, is there
a way to make each value an absolute value in the report, and then get
the sum of that?

Example: -1+ - 2 + -4 = 7
 
Yes, use the abs function around each item.

Abs(-1) + Abs(2) + Abs(-464)



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top