Part of the formula is to take the absolute value of the sale ratio minus the median ratio, per subdivision.
I am able to get the median ratio by using a running total (or a formula), but I am unable to figure out how to compare it to each detail line and calculate the absolute difference (abs(ratio – median ratio) and then add the values up to get the sum of the absolute difference in the group footer.
I have tried this every which way I can think of (i.e., sub-reports, passing the value back to the main report), but with no success. I am brain dead and weary. Any suggestions would be appreciated.
|
Subdivision |
PID |
Ratio |
Median |
Absolute Difference |
Sum of Absolute Difference Per Subdivision |
|
1082 |
1 |
0.933 |
0.8845 |
0.0485 |
|
|
1082 |
2 |
0.887 |
0.8845 |
0.0025 |
|
|
1082 |
3 |
0.882 |
0.8845 |
0.0025 |
|
|
1082 |
4 |
0.878 |
0.8845 |
0.0065 |
0.06 |
|
1083 |
5 |
0.854 |
0.9145 |
0.0605 |
|
|
1083 |
6 |
0.975 |
0.9145 |
0.0605 |
0.121 |
|
1085 |
7 |
0.942 |
0.918 |
0.024 |
|
|
1085 |
8 |
0.891 |
0.918 |
0.027 |
|
|
1085 |
9 |
0.918 |
0.918 |
0 |
0.051 |
|
1432 |
10 |
0.892 |
0.819 |
0.073 |
|
|
1432 |
11 |
0.801 |
0.819 |
0.018 |
|
|
1432 |
12 |
0.905 |
0.819 |
0.086 |
|
|
1432 |
13 |
0.819 |
0.819 |
0 |
|
|
1432 |
14 |
0.812 |
0.819 |
0.007 |
0.184 |