condition on an average (1 Viewer)

Chief

Registered User.
Local time
Today, 02:27
Joined
Feb 22, 2012
Messages
156
Hello, (access 2010)

I have a text box in a report (see screen shot)
Control Source as follows as per screenshot:
Total Jobs:=DCount("jobid","qryFSales")
Total Invoice Amount:=Sum([invoice_amount])
Avg Invoice Amount:=Sum([invoice_amount])/[txtTotalJobs]
RTA Jobs:=Count(IIf(Nz([Assembled],0)=0,1,Null))
RTA Jobs $:=Sum(IIf([Assembled]=0,[invoice_amount],0))
RTA Jobs $ Avg:=Sum([txtRtaCost])/[txtRtaJobs]

this produces an error box looking for txtRtaCost and txtAssCost to not produce the average for RTA Jobs $ Avg: and Assembled Jobs $ Avg:

Secondly:
If a job has NO $ value ($0.00) associated to it, how do I not include those jobs in the average sum?

Appreciate the help for this new user :eek:

Thanks
Chief
 

Attachments

  • salesforecastAvg01.jpg
    salesforecastAvg01.jpg
    65.8 KB · Views: 110

Users who are viewing this thread

Top Bottom