How to do a Running Sum with Only Negatives 
Author Message
 How to do a Running Sum with Only Negatives

I want to create a report that only prints out records that have a negative
result in the running sum in any location, even if the last be positive.

The data in the query that the report is based on (before a running sum) looks
like the following:

Style   Color   Date    Total
1911C   Gray    1/1/98  1200
1911C   Gray    3/27/02 -800
1911C   Gray    3/27/02 -500
1911C   Gray    5/10/02 2400
1911C   S2002A  1/1/98  2000
1911C   S2002A  3/27/02 -1500
1911C   S2002A  3/27/02 100

After the running sum, it should look like the chart below (in the report) if I
didn't have any filter to eliminate anything.  Also, the detail section is
based on the Style and Color combination, beginning again on a new Color or a
new Style.  These Style and Color combinations must run in the order of the
Date column.

Style   Color   Date    Total
1911C   Gray    1/1/98  1200
1911C   Gray    3/27/02 400
1911C   Gray    3/27/02 -100
1911C   Gray    5/10/02 2300
-------------------------------------------------
1911C   S2002A  1/1/98  2000
1911C   S2002A  3/27/02 500
1911C   S2002A  3/27/02 600

But after my filter, I want only those that are troublesome, the ones with
negative numbers.  So I would want this only:

Style   Color   Date    Total
1911C   Gray    1/1/98  1200
1911C   Gray    3/27/02 400
1911C   Gray    3/27/02 -100
1911C   Gray    5/10/02 2300

Am I approaching this correctly?

The negatives are "Store Cancel Dates" and the positves are "Production in
Warehouse Dates."  The dates marked 1/1/98 are units (Totals) already in the
warehouse.  Therefore this report shows troubled goods, goods that may have to
be aired in quickly instead of boated in slowly through the Panama Canal, goods
where a salesman may need to extend a Cancel Date on a Store order.  Just in
case you wanted to know!  Thanks,

Matt



Sat, 11 Sep 2004 04:02:27 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. doing sums in a table outlook view

2. Running sums on a FORM??

3. Running sum

4. Running sum question again

5. Running Sums in Forms

6. How to Count with Running Sum

7. Running Sums with queries

8. AM I missing something - Sum and Cumulative Sum

9. Running Sum

10. Creating a running sum query

11. running sum

12. Help!, running sum on form!

 

 
Powered by phpBB® Forum Software