PC Review


Reply
Thread Tools Rate Thread

Average of Totals

 
 
Ferdie
Guest
Posts: n/a
 
      6th Jan 2010
I have a Subtotal (SUM) for the Month of all the balances of several
accounts...I need to Average the Subtotal (Sum) for each month. When I use
the average function, it averages the entire population, which is NOT what I
want.

Any help?
 
Reply With Quote
 
 
 
 
Lynn Trapp
Guest
Posts: n/a
 
      6th Jan 2010
Can you post the SQL for your query?

--
Lynn Trapp


"Ferdie" wrote:

> I have a Subtotal (SUM) for the Month of all the balances of several
> accounts...I need to Average the Subtotal (Sum) for each month. When I use
> the average function, it averages the entire population, which is NOT what I
> want.
>
> Any help?

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      6th Jan 2010
On Wed, 6 Jan 2010 10:34:03 -0800, Ferdie <(E-Mail Removed)>
wrote:

>I have a Subtotal (SUM) for the Month of all the balances of several
>accounts...I need to Average the Subtotal (Sum) for each month. When I use
>the average function, it averages the entire population, which is NOT what I
>want.
>
>Any help?


You'll probably need either a Totals query (to calculate the averages) based
on another Totals query (calculating the subtotal); or you can use the Sorting
and Grouping feature of a Report to do the same thing. In any case you'll need
two levels of summation.

If you would like help doing so please post the SQL view of your current
query, and indicate what you want averaged, and over what groups.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Ferdie
Guest
Posts: n/a
 
      7th Jan 2010
Hi John,
Thanks for you quick reply. I am actually trying to do this in the Reports.
Lets say, in the details, there are different account number with
corresponding balances. These balances are totalled in the footer of that
Group (month) =Sum([balances]). Then, I need to Average all the monthly
totals in the footer of the Report. In the report footer, if i use
=Avg([balances]) , it averages ALL the details, NOT the monthly totals.
Hope this clarifies the problem. thanks.




"John W. Vinson" wrote:

> On Wed, 6 Jan 2010 10:34:03 -0800, Ferdie <(E-Mail Removed)>
> wrote:
>
> >I have a Subtotal (SUM) for the Month of all the balances of several
> >accounts...I need to Average the Subtotal (Sum) for each month. When I use
> >the average function, it averages the entire population, which is NOT what I
> >want.
> >
> >Any help?

>
> You'll probably need either a Totals query (to calculate the averages) based
> on another Totals query (calculating the subtotal); or you can use the Sorting
> and Grouping feature of a Report to do the same thing. In any case you'll need
> two levels of summation.
>
> If you would like help doing so please post the SQL view of your current
> query, and indicate what you want averaged, and over what groups.
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
Ferdie
Guest
Posts: n/a
 
      7th Jan 2010
Hi Lynn,

Hi John,
Thanks for you quick reply. I am actually trying to do this in the Reports.
Lets say, in the details, there are different account number with
corresponding balances. These balances are totalled in the footer of that
Group (month) =Sum([balances]). Then, I need to Average all the monthly
totals in the footer of the Report. In the report footer, if i use
=Avg([balances]) , it averages ALL the details, NOT the monthly totals.
Hope this clarifies the problem. thanks.





"Lynn Trapp" wrote:

> Can you post the SQL for your query?
>
> --
> Lynn Trapp
>
>
> "Ferdie" wrote:
>
> > I have a Subtotal (SUM) for the Month of all the balances of several
> > accounts...I need to Average the Subtotal (Sum) for each month. When I use
> > the average function, it averages the entire population, which is NOT what I
> > want.
> >
> > Any help?

 
Reply With Quote
 
Ferdie
Guest
Posts: n/a
 
      7th Jan 2010
I am actually trying to do this in the Reports. Lets say, in the details,
there are different account number with corresponding balances. These
balances are totalled in the footer of that Group (month) =Sum([balances]).
Then, I need to Average all the monthly totals in the footer of the Report.
In the report footer, if i use =Avg([balances]) , it averages ALL the
details, NOT the monthly totals.
Hope this clarifies the problem. thanks.






"Ferdie" wrote:

> I have a Subtotal (SUM) for the Month of all the balances of several
> accounts...I need to Average the Subtotal (Sum) for each month. When I use
> the average function, it averages the entire population, which is NOT what I
> want.
>
> Any help?

 
Reply With Quote
 
John Spencer
Guest
Posts: n/a
 
      7th Jan 2010
I think this will work if I haven't gotten my math facts messed up.

Add another control to your Group Footer:
Name: txtMonthCount
Control Source: =1
Running Sum: Over All

In the report footer:
Add a control
Name: MyAvg
Control Source: Sum([Balances])/[txtMonthCount]


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Ferdie wrote:
> I am actually trying to do this in the Reports. Lets say, in the details,
> there are different account number with corresponding balances. These
> balances are totalled in the footer of that Group (month) =Sum([balances]).
> Then, I need to Average all the monthly totals in the footer of the Report.
> In the report footer, if i use =Avg([balances]) , it averages ALL the
> details, NOT the monthly totals.
> Hope this clarifies the problem. thanks.
>
>
>
>
>
>
> "Ferdie" wrote:
>
>> I have a Subtotal (SUM) for the Month of all the balances of several
>> accounts...I need to Average the Subtotal (Sum) for each month. When I use
>> the average function, it averages the entire population, which is NOT what I
>> want.
>>
>> Any help?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the average of two generated totals PVANS Microsoft Excel Programming 1 3rd Aug 2009 05:44 PM
use sub-totals and average in same calculation Sherry L Microsoft Excel Worksheet Functions 0 26th Jan 2008 06:56 PM
Sum group totals and then average by # of groups =?Utf-8?B?VGFtbXk=?= Microsoft Access Reports 2 1st Nov 2007 05:12 PM
Access totals, sum, average =?Utf-8?B?cGhpbCBhY2Nlc3M=?= Microsoft Excel Misc 1 14th Jul 2005 10:45 PM
Record (row) totals and average - how? hello Microsoft Access Getting Started 4 14th Mar 2005 06:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:24 AM.