How to Sum Averages by groups

N

Nikki

Each group contains a school, multiple claim numbers and the insurance
premium generated by that school. I need to total the WC Premium for each
school and divide by the total losses. An example of one group(district) is
below... keep in mind the Premium is only 80000 total and not the sum there
of, but I am looking for the sum of Premium for each School

EXAMPLE
School Claim Premium Net Losses
San Mateo 208010000 80000 500
San Mateo 208025200 80000 700
San Mateo 208882929 80000 600
 
J

John Spencer

Is the Premium constant per school? That is is Premium for San Mateo always
80000 (at least for the time frame you are looking at)?

Do you want to do this in a query? Or in a report? The query could look
like

SELECT School
, First(Premium) as ThePremium
, Sum([Net Losses]) as TotalClaims
, First(Premium)/Sum([Net Losses]) as SomeCalc
FROM [Your Table]
GROUP BY School
, First(Premium)/Sum([Net Losses])

If you wanted to do this in a group footer in a report, you could add a
control with the following as its source
= [Premium]/Sum([Net Losses])

If Net Losses ever totals zero then you would need to handle that problem or
you would get error messages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top