Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cumulative Calculation 1

Status
Not open for further replies.

northw

MIS
Nov 12, 2010
140
0
0
US
Hi All,

I have a question regarding cumulative calculation where I want to calculate row by row Invoice and Payment.

Here is the sample data and my desired output.

Cust/Month/Trans/Amount/CumulativeBal(my desired output)
1, 1, Due, 100, 100
1, 1, Payment, 50, 50
1, 1, Payment, 50, 0

1, 2, Due, 500, 500
1, 2, Payment, 500, 0

1, 3, Due, 2000, 2000
1, 3, Payment, -400, 2400
1, 3, payment, 100, 2300,
1, 3, payment, 2300, 0

1, 4, Due, 800, 800
1, 4, Due, 200, 1000
1, 4, Payment, 1000, 0

There are no groups for the dataset, the report will pull only one customer at a time.

Any help/direction is appreciated.

Thanks!

 
Could handle this a couple of different ways. Here is one.

-Create a formula and call it "Amount for Cum Bal"
-Use this logic for the formula:

Code:
if {Table.Trans} = "Payment"
then {Table.Amount} * -1
else {Table.Amount}

-Create a new Running Total field that summarizes the formula above, evaluates each record, and never resets
-Place the running total field on your report after the other columns, assuming that they are already there. You might need to add some sorts on Cust, Month, and Trans

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top