Abs
The sum of absolute values of the selection.
This method returns the sum of the absolute values of each item in a set of numbers.
The absolute value of a number refers to the number without its sign.
Adding each item of a set of numbers will produce its total or sum.
Sample 1:
Given a list of arbitrary numbers:
Arbitrary |
3 |
2 |
1 |
0 |
-1 |
-2 |
-3 |
0 |
0 |
0 |
List of positive and negative numbers
Computing for the absolute value
-
Compute the absolute value for each item.
Arbitrary |
3 |
2 |
1 |
0 |
1 |
2 |
3 |
0 |
0 |
0 |
List of absolute values
-
Compute the sum of the absolute numbers:
3 + 2 + 1 + 0 + 1 + 2 + 3 + 0 + 0 + 0 = 12
Sample 2:
Assuming that the same list of numbers has multiple groupings or breakdowns as shown below.
Grouping |
Arbitrary |
1 |
3 |
1 |
2 |
1 |
1 |
1 |
0 |
2 |
-1 |
2 |
-2 |
2 |
-3 |
3 |
0 |
3 |
0 |
3 |
0 |
List of values with groupings
Computing for the Absolute value based on the Grouping
-
Compute for the absolute values of each item based on the Grouping defined.
Grouping |
Arbitrary |
1 |
3 |
1 |
2 |
1 |
1 |
1 |
0 |
2 |
1 |
2 |
2 |
2 |
3 |
3 |
0 |
3 |
0 |
3 |
0 |
List of absolute values with groupings
-
Compute the sum of the absolute numbers based on the grouping.
Grouping |
Arbitrary |
1 |
6 |
2 |
6 |
3 |
0 |
Final result
Computation Details:
Group 1: 3 + 2 + 1 + 0 = 6
Group 2: 1 + 2 + 3 = 6
Group 3: 0 + 0 + 0 = 0
Sample 3:
Given the following sample fields:
Number |
Arbitrary |
Negative Values |
Positive Values |
One |
Binary |
Currency |
Decimal |
1 |
3 |
-1 |
1 |
1 |
0 |
$1.00 |
1.01 |
2 |
2 |
-2 |
2 |
|
1 |
$10.00 |
2.02 |
3 |
3 |
-3 |
3 |
|
0 |
$100.00 |
3.03 |
4 |
0 |
-4 |
4 |
|
1 |
$1,000.00 |
4.04 |
5 |
-1 |
-5 |
5 |
|
0 |
$10,000.00 |
5.05 |
6 |
-2 |
-6 |
6 |
|
1 |
-$1.00 |
6.06 |
7 |
-3 |
-7 |
7 |
|
0 |
-$10.00 |
7.07 |
8 |
0 |
-8 |
8 |
|
|
-$100.00 |
8.08 |
9 |
0 |
-9 |
9 |
|
|
-$1,000.00 |
9.09 |
10 |
0 |
-10 |
0 |
|
|
$0.00 |
0.00 |
Sample fields
Abs results:
Number |
Arbitrary |
Negative Values |
Positive Values |
One |
Binary |
Currency |
Decimal |
55 |
12 |
55 |
45 |
1 |
3 |
12,222.00 |
45.45 |
Results per field