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!

Group total on multiple rows 1

Status
Not open for further replies.

measles

Technical User
May 8, 2003
3
0
0
US
I have groups set up on a date to change group on every month. The data that returns is as follows:
CASE DATE MONTHS
934 01/16/2008 12
934 01/16/2008 12
1435 01/25/2008 6

Right now the total for the Months field that returns is 30, but I only need the total added once per case (18). Case 934 returned two rows because there are two records. Normally I solve this problem using a running total that changes on change of group, however because the group is based on a date, the running total just gives me the amount of 12. How can I get this to give me the correct total of 18?
 
Create a running total:
Field To Summarize: The months field that you want to sum.
Type of Summary: Sum
Evaluate: Use Formula - the formula will look something like this: PreviousIsNull({table.CaseNum}) or {table.CaseNum} <> previous({table.CaseNum})
Reset on change of group: Chose the date field you're grouping on.

This will do a running total of the number of months but only add them to the total if the case number isn't equal to the case number of the previous record. This will only work if you're ordering your data by case number and not by date within the date group.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top