Senin, 17 April 2017

Re: [MS_AccessPros] Overall Average on a report

 

Jim-

Try adding a control in the footer:

=Count([EmployeeID])

(Or use whatever is the unique field that identifies the employee.)

That should give you 5, and you can use that to calculate your average.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Apr 17, 2017, at 19:38, luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hello all,


I have a salary report that shows the salary for employees by job code. It works great but someone just discovered that the Average, Min, and Max calculations are incorrect. I guess that it has been this way for years.


The salary report has Avg, Min, and max calculations on the footer. So I was able to add a field to the report and get a sum of the [Annl Rt] over all and that is correct, but I am unable to get a correct avg, min or max because there are some employees that are on split accounts, like 75 and 25. The calculations should be calculating by the number of employees. right now there are 5 employees on the report but because of the 2 employees on split accounts it shows as 7 employees, which makes the average way off.


I have a field named txtSumOfAnnlRt that has the control source of =Sum([Annl Rt]) and it has Running sum "Over all" in the property sheet. This is the correct number.

So I tried using the txtSumOfAnnlRt field for the Avg and others but it gives me a value of $0 with running sum over all.


If I use =Avg([Annl Rt]) and Running Sum "Over all" it gives me the avg of the 7 employees which it should.


what do I do to get a group total?


Thank You

Jim Wagner

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar