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

Running Sum BY Group

Status
Not open for further replies.

twifosp

Programmer
Jul 25, 2003
186
US
I have some data that looks like:

Code:
Date	GroupA	GroupB	Units
10/8/2009	ABC	AAA	100
10/8/2009	DEF	BBB	150
10/8/2009	GHI	CCC	90
10/9/2009	ABC	AAA	105
10/9/2009	DEF	BBB	155
10/9/2009	GHI	CCC	95

I want to create a running total by group and by date. So the data would look like this:

Code:
Date	GroupA	GroupB	Units	R SUM
10/8/2009	ABC	AAA	100	100
10/8/2009	DEF	BBB	150	150
10/8/2009	GHI	CCC	90	90
10/9/2009	ABC	AAA	105	205
10/9/2009	DEF	BBB	155	305
10/9/2009	GHI	CCC	95	185

I would normally just write this as a sub query in SQL, but the level of access I have for this client does not permit this.

How can I write a formula that does this?
 
Oops, I think I posted this in the incorrect forum.
 
How many groups can there be? Is it a static number?

-LB
 
3 groups in this particular dataset, but it can vary. I would say it is not static.
 
So is this a Crystal Reports question? You said you might have posted in the wrong forum...

-LB
 
It is technically for BO desktop intelligence. Formulas should work for both, right?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top