Grouping Calculations

J

Jen

I’ve created a report in which invoices are grouped by vendor and then by
service period. I’ve calculated the total invoice amount. But I also need
to calculate the average invoice amount per service period. The problem I’m
having is that there aren’t the same number of service period by month
groupings per vendor. Please help.
 
M

Marshall Barton

Jen said:
I’ve created a report in which invoices are grouped by vendor and then by
service period. I’ve calculated the total invoice amount. But I also need
to calculate the average invoice amount per service period. The problem I’m
having is that there aren’t the same number of service period by month
groupings per vendor.

You can count the number of service periods by adding a text
box (named txtServicePeriods) to the service period group
header or footer section. Set its control source expression
to =1 and RunningSum property to Over Group.

Then the vendor group footer text box expression would be:
=Sum([invoice amount field]) / txtServicePeriods
 
J

Jen

Marshall....Thank you so much for this. It worked. I've been trying to get
answers for days, but I guess my posts were too long. At least now I know to
keep my questions short and to the point without going into too much detal.

Marshall Barton said:
Jen said:
I’ve created a report in which invoices are grouped by vendor and then by
service period. I’ve calculated the total invoice amount. But I also need
to calculate the average invoice amount per service period. The problem I’m
having is that there aren’t the same number of service period by month
groupings per vendor.

You can count the number of service periods by adding a text
box (named txtServicePeriods) to the service period group
header or footer section. Set its control source expression
to =1 and RunningSum property to Over Group.

Then the vendor group footer text box expression would be:
=Sum([invoice amount field]) / txtServicePeriods
 

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