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!

Averaging Group (running) Totals? Is there a way?

Status
Not open for further replies.

jaybar48

Technical User
Feb 16, 2002
61
US
I have a report that groups on client ID and then Health Care Agency name.

The report gives the client ID and then the number and names of Health Care Agencies serving the client (unduplicated).

This is done by running total that gives a distinct count of client ID and resetting the count for each change in agency name. I am using the RT expert.

The report looks something like this:

Client ID: 101
Name of Agency A
Name of Agency B
Name of Agency C

Total number of Agencies serving client 3

Client ID: 102

Name of Agency A
Name of Agency B

Total Number of Agencies Serving Client 2


I would like to average the number of agencies that serve each client.

Is there any way to compute group or running totals to allow this.

Thanks so much,

Jay










 
I think you should be able to create a formula to accumulate the running totals:

//{@sumrts} to be placed in the group (Client) footer:
whileprintingrecords;
numbervar sumrt := sumrt + {#agencyrunningtotal}

Then create a formula {@average} for the report footer:

whileprintingrecords;
numbervar sumrt;

sumrt/distinctcount({table.clientID})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top