Use Calculate Field in a Pivot Table to calculate a Monthly Average from the Category Grand Totals (the Sum of the Monthly Totals)??

starchaser_lib8

New Member
Joined
Aug 6, 2010
Messages
2
Using Excel 2007 & Windows XP.

I've made a Pivot Table that filters pages by Years, then gives me monthly transaction totals by categories. Months across the columns and categories down the rows, and gives me the Grand Totals for each Month at the bottom and the Grand Totals for each category at the right. I want to insert a Calculated Field beside the category Grand Totals at the right that will give me the monthly average for each category. NOT the average transaction amount per month but the Average Total = the Grand Total per category / the # of months contributing to the Grand Total per category. I have data for May through Dec for 2009 & data for Jan through the current date in Aug for 2010. That means that I can't just divide the Grand Total per category by 12 months I need to figure out how to make it count the # of months of data available in each year.

I can't figure out how to count the # of months of data available in each year or how to even calculate the average by dividing the Grand Total per category since it doesn't appear the field list.

Any advice or insight would be greatly appreciated! Thanks!

 
Last edited:

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

dweezle25

New Member
Joined
Jul 30, 2010
Messages
2
By any chance were you able to figure out a way to make it work? Now I'm having a similar issue.
 

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
Maybe it'd be easier with a query table? To create manually, start via menu ALT-D-D-N. Formulas can be used with a query table: for example, a COUNT for the months. Or maybe the average can be worked out in the SQL for the query (or even for the pivot table, in fact).

Please post sample data - inputs & results - as it helps enormously. The sticky threads at the top of the forum page refer.

http://www.mrexcel.com/forum/showthread.php?t=127080

http://www.mrexcel.com/forum/showthread.php?t=89356
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,695
Messages
5,512,918
Members
408,921
Latest member
xfigo

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top