count days worked

R

Robert

I have a report broken down by employees and days worked and sales made.

name date amount
robb 6/1/7 $444.00
robb 6/2/7 $115.00
robb 6/2/7 $555.00
robb 6/4/7 $943.00

what I’m trying to do is add the number of days worked and then div by
amount sold. the problem I’m having is getting the number of days worked
when I have repeating values (2 sales on 6/2.)
final report should look like this. I must list all sales above, I cannot
sum on daily totals.
total
Name # of days worked avg sale per day
robb 3 $685
 
D

Dennis

Create a query with your 3 columns name,date and amount and then click on the
sigma (totals) button on the toolbar. Leave name and date as group by, but
change the total row on your amount column to Sum.
Save this query (this will be used as a sub-query for your next query).
Create a new query using your saved query as the source.
Add 3 columns of Name, date and SumOfAmount and then click on the sigma icon
on the toolbar again. Leave Name as group by, change date to count and
SumOfAmount to Avg.
Save and run this query.
 
D

Duane

Use you original report. Select Sorting and Grouping from the View Menu.
Add the [Name] field to the Field/Expression. Yes for group header and
group footer.

Move the [name] field from the detail section to the group header section,
if you don't want it to repeat the emploees name. Also, place the Date and
Amount labels in the header section.

Create 3 text controls in the group footer.
1.TotalDays - Source =Count([Name])
2. SumOfTotalAmount - Source =Sum([SumOfAmount]) Set the visible property
to No, if you don't want to see the total sales.
3. Average - Source - =([SumOfTotalAmout]/[TotalDays])

Arrange the textboxes to suit.
 

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