| |
 |
Hotline Question of the Month |
| by Margaret Jeronim |
|
| |
Question: I've created a report with running totals. It gives me running totals for all the records in the report. Instead, I'd like to get a running total for each customer number.
How can I reset the running total for each time I get to a new customer number? |
Answer:
A running total is a calculation that displays the current "balance" of the values in the field. Let's assume that you would like to have running total for QTY on hand that is equal to original QTY - QTY shipped.
If the value of the original QTY in record one is equal to 1000 and the QTY shipped value is equal to 50 , then the running total of QTY on hand for that record is 950.
If the value of the QTY shipped in record two is equal to 30, then the running total for QTY on hand for record two is 920 (derived 950-30).
Running totals are not summed in total levels because a constant "sum" (or difference) is calculated at each record. This is how this report is running now - it keeps the running total for all the records. In order to specify a running total based on a customer number, you will need to include conditional calculations and control calculations.
(See Figure 1)
Figure 1 - Set up for conditional and control calculations.

Control calculations allow users to control when, or if, another calculation will be performed. This is based on the fact that calculations in the mrc-Productivity Series are performed in the order in which they appear in the "Work with Calculated Fields" screen.
In Figure 1, "customer# hold" is a control calculation. Based on its value, QTY on hand will continue to subtract the 'QTY Shipped' from the previous record 'QTY on hand' (for that same customer number), or it will reset when the customer number changes. (See Figure 2 for the generated report.)
Figure 2 - report with running totals for each Customer#
Have a hotline question of your own? Send an e-mail to support@mrc-productivity.com and let our product specialists help you!
|
|
 |
 |
 |
 |
mrc publishes this newsletter on a monthly basis. Subscription is free of charge. Please send any questions or comments about this newsletter to news@mrc-productivity.com. This newsletter is edited by Heather Gately.
To unsubscribe, please just reply to this e-mail with Unsubscribe in the subject line.
View our privacy promise.
|
 |
|