Calculating Absolute Value

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.
 
J

John Spencer MVP

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
 
L

lil lam

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
 
J

John Spencer MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top