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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a running total to work on a group in a crosstab

Status
Not open for further replies.

shaleen7

MIS
Jun 23, 2002
188
US
I'm trying to set up a running total in my crosstab.


In my select statement, I've asked for every application that has been issued in my database. I then did the following.

1.) I created 2 groups in my Crystal 9 crosstab which I placed in the row section
2.) I placed my issued date in the column secton of my crosstab.

3.) I placed a count function on the application number.

Current Results
Jan 87 Feb 87 Mar 87 ------- Jan 04 Feb 04
TV 20 13 1 45 32
VCR 25 10 36 50 30
However I want to keep adding each month's total to the previous months. No matter what I try my numbers are too high.

Desired Results
Jan 87 Feb 87 Mar 87 ------- Jan 04 Feb 04
TV 20 33 34 79 111
VCR 25 35 71 121 151

Any suggestions? Thanks.

 
I'm not sure about the capacity of 9.0, but I'm guessing it won't allow for running totals. If this is the case, then you would need to create a manual crosstab, using formulas like the following so that you accumulate results over time:

if {table.date} < Date(1987, 02, 01) then {table.amt} //Jan 87

if {table.date} < Date(1987, 03, 01) then {table.amt} //Feb 87

You would need a group on {table.equipment} and then you would insert summaries on the above formulas and suppress the details.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top