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

Formula or Running Total for grouping?

Status
Not open for further replies.

zenzabar

Technical User
Jan 24, 2007
24
US
My data looks like this grouped by provider initials:

JLJ
Patient # Appointment Date Amount
12345 4/23/07 $100.00
67890 4/23/07 $125.00
12345 4/27/07 $100.00
-------
$325.00 total

POH
Patient # Appointment Date Amount
65656 4/21/07 $150.00
54545 4/22/07 $120.00
12588 4/22/07 $150.00
65656 4/27/07 $150.00
-------
$570.00 Total

What I can't figure out is how to not have the duplicate amounts for the patients seen more than once in a week's timeframe added to the total amount per provider. I would like to show patient #, appointment date, the amount can show again, but I do not want that subsequent amount added in the total for each group of providers. Should I look at building a running total or a formula to get the desired result?? This is what I want to see:
JLJ
Patient # Appointment Date Amount
12345 4/23/07 $100.00
67890 4/23/07 $125.00
12345 4/27/07 $100.00
-------
$225.00 Total

POH
Patient # Appointment Date Amount
65656 4/21/07 $150.00
54545 4/22/07 $120.00
12588 4/22/07 $150.00
65656 4/27/07 $150.00
-------
$420.00 Total
 
If you insert a group on patient # you can use a running total where you evaluate on change of group: patient # and reset on change of group: provider.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top