nickfatool
IS-IT--Management
CRDev8.5 ODBC Access97
Client would like to view summarized weekly data inclusive of running sum to display "Period to Date" figures.
"Period" could be anything from 2 to 52 weeks.
I've atttempted using a crosstab to display the data on an x-axis timeline, it's great, but I can't get the all-important running sum.
I'm sure lots of people analyse their data in a similar fashion.
Anyone else found ways to pack more punch when working "sideways"?
Cheers,
Rob Dexter.
Client would like to view summarized weekly data inclusive of running sum to display "Period to Date" figures.
"Period" could be anything from 2 to 52 weeks.
I've atttempted using a crosstab to display the data on an x-axis timeline, it's great, but I can't get the all-important running sum.
Code:
------------
Sample Data:
------------
SaleDate: Client: SaleAmt:
--------------------------------
02/02/02 Jakes 100.00
03/02/02 Jakes 100.00
08/02/02 Clems 100.00
14/02/02 Jakes 100.00
15/02/02 Clems 100.00
20/02/02 Petes 100.00
21/02/02 Petes 100.00
22/02/02 Jakes 100.00
23/02/02 Jakes 100.00
26/02/02 Clems 100.00
02/02/02 Jakes 100.00
02/02/02 Jakes 100.00
04/02/02 Petes 100.00
05/02/02 Clems 100.00
06/02/02 Petes 100.00
----------------
Required Output:
----------------
Week Ending: 08/02 15/02 22/02 01/03 08/03
Total: 300.00 200.00 300.00 200.00 400.00
Count: 3 2 3 2 4
Average: 100.00 100.00 100.00 100.00 100.00
Per To Date: 300.00 500.00 800.00 1000.00 1400.00
I'm sure lots of people analyse their data in a similar fashion.
Anyone else found ways to pack more punch when working "sideways"?
Cheers,
Rob Dexter.