Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Average Calculations from Pivot Tables - Get Pivot Data? Calc Fiel

Firstly - I am a big fan of this site, have searched previous questions and
just cant find/understand my problem.
My question - I want to obtain two averages from pivot table data displayed
in cells to the left of pivot table. They are an Average for the entire year
(Avg YTD B6:B8) and an Average for one season (Avg Aut C6:C8) against each
Name(A6:A8) from the Pivot table(D3:J17). The PT has two Field columns,
Season(E3) with two items Aut(E4) and Sum(H4) and Game(F3) with 6 items,
Games 1 - 3 for both seasons(E5:J5). Example Below

A B C D E F G H
I J
3 Runs Season Game
4 Aut Sum
5 Name Avg YTD Avg Aut Name 3 2 1 3 2 1
6 Kym ?? ?? Kym -6 5 4 8 6 7
7 Jimmy ?? ?? Jimmy 13 31 5 1 11 5
8 Craig ?? ?? Craig 15 2 11 8 19 17

So I want to display the average for the entire year (both seasons - Aut &
Sum) in Avg YTD and only for one season in Avg Aut. Also it needs to still
capture the averages as the PT updates and grows larger when the PT cells
expand to the left. More games will be added to the current season which in
this example will be Aut.

I have chosen to place the formulas outside and to the left of PT for
formatting reasons. I am happy to have them inside PT if they can be
displayed to the left. Also I want to maintain PT data and layout as in
example. Using 2003 version.

I hope I have explained this clearly and look forward to the always talented
response.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default Average Calculations from Pivot Tables - Get Pivot Data? CalcFiel

This will create an average for each season, and an overall average:

Double-click on the Season field button, and for Subtotals, choose
Average, then click OK
In the source data, add a column with the heading YTD, and leave all the
cells blank in that column.
Refresh the pivot table, and add the YTD field to the column area,
before Season
Double-click on the YTD field button, and for Subtotals, choose Average,
then click OK
Select the YTD cell that says (Blank), and type a couple of space
characters, then press the Enter key.


westy wrote:
Firstly - I am a big fan of this site, have searched previous questions and
just cant find/understand my problem.
My question - I want to obtain two averages from pivot table data displayed
in cells to the left of pivot table. They are an Average for the entire year
(Avg YTD B6:B8) and an Average for one season (Avg Aut C6:C8) against each
Name(A6:A8) from the Pivot table(D3:J17). The PT has two Field columns,
Season(E3) with two items Aut(E4) and Sum(H4) and Game(F3) with 6 items,
Games 1 - 3 for both seasons(E5:J5). Example Below

A B C D E F G H
I J
3 Runs Season Game
4 Aut Sum
5 Name Avg YTD Avg Aut Name 3 2 1 3 2 1
6 Kym ?? ?? Kym -6 5 4 8 6 7
7 Jimmy ?? ?? Jimmy 13 31 5 1 11 5
8 Craig ?? ?? Craig 15 2 11 8 19 17

So I want to display the average for the entire year (both seasons - Aut &
Sum) in Avg YTD and only for one season in Avg Aut. Also it needs to still
capture the averages as the PT updates and grows larger when the PT cells
expand to the left. More games will be added to the current season which in
this example will be Aut.

I have chosen to place the formulas outside and to the left of PT for
formatting reasons. I am happy to have them inside PT if they can be
displayed to the left. Also I want to maintain PT data and layout as in
example. Using 2003 version.

I hope I have explained this clearly and look forward to the always talented
response.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Average Calculations from Pivot Tables - Get Pivot Data? Calc

This result changed the layout of PT and placed the subtotals on the right of
data. Also I do not want the subtotal of both seasons, only one season and
YTD.
The resulting layout should be

Name,YTD AV, Season AV, Pivot data (Game and Season)

So is there any way to have subtotals on left. I want to keep the layout of
pivot and Avgs as per example for formatting/printing reasons.

"Debra Dalgleish" wrote:

This will create an average for each season, and an overall average:

Double-click on the Season field button, and for Subtotals, choose
Average, then click OK
In the source data, add a column with the heading YTD, and leave all the
cells blank in that column.
Refresh the pivot table, and add the YTD field to the column area,
before Season
Double-click on the YTD field button, and for Subtotals, choose Average,
then click OK
Select the YTD cell that says (Blank), and type a couple of space
characters, then press the Enter key.


westy wrote:
Firstly - I am a big fan of this site, have searched previous questions and
just cant find/understand my problem.
My question - I want to obtain two averages from pivot table data displayed
in cells to the left of pivot table. They are an Average for the entire year
(Avg YTD B6:B8) and an Average for one season (Avg Aut C6:C8) against each
Name(A6:A8) from the Pivot table(D3:J17). The PT has two Field columns,
Season(E3) with two items Aut(E4) and Sum(H4) and Game(F3) with 6 items,
Games 1 - 3 for both seasons(E5:J5). Example Below

A B C D E F G H
I J
3 Runs Season Game
4 Aut Sum
5 Name Avg YTD Avg Aut Name 3 2 1 3 2 1
6 Kym ?? ?? Kym -6 5 4 8 6 7
7 Jimmy ?? ?? Jimmy 13 31 5 1 11 5
8 Craig ?? ?? Craig 15 2 11 8 19 17

So I want to display the average for the entire year (both seasons - Aut &
Sum) in Avg YTD and only for one season in Avg Aut. Also it needs to still
capture the averages as the PT updates and grows larger when the PT cells
expand to the left. More games will be added to the current season which in
this example will be Aut.

I have chosen to place the formulas outside and to the left of PT for
formatting reasons. I am happy to have them inside PT if they can be
displayed to the left. Also I want to maintain PT data and layout as in
example. Using 2003 version.

I hope I have explained this clearly and look forward to the always talented
response.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default Average Calculations from Pivot Tables - Get Pivot Data? Calc

The subtotals can't be moved to the left of the items, and to extract
the data, e.g. Avg YTD, from the pivot table with a GetPivotData
formula, the values must be visible in the pivot table.

You could make a copy of your pivot table on another worksheet, with a
setup as I described.
Then, in the cells to the left of you main pivot table, use GetPivotData
formulas to extract the required averages from the second pivot table.

For example, with the second pivot table on Sheet2, and the name Kym in
cell A6, enter this formula in cell B6:

=GETPIVOTDATA(Sheet2!$A$4,$A6 & " YTD[' ';Average]")

Put the season name, Aut, in cell C4
In cell C6, enter the formula:

=GETPIVOTDATA(Sheet2!$A$4,$A6 &" Season[" &C$4 &";Average]")

westy wrote:
This result changed the layout of PT and placed the subtotals on the right of
data. Also I do not want the subtotal of both seasons, only one season and
YTD.
The resulting layout should be

Name,YTD AV, Season AV, Pivot data (Game and Season)

So is there any way to have subtotals on left. I want to keep the layout of
pivot and Avgs as per example for formatting/printing reasons.

"Debra Dalgleish" wrote:


This will create an average for each season, and an overall average:

Double-click on the Season field button, and for Subtotals, choose
Average, then click OK
In the source data, add a column with the heading YTD, and leave all the
cells blank in that column.
Refresh the pivot table, and add the YTD field to the column area,
before Season
Double-click on the YTD field button, and for Subtotals, choose Average,
then click OK
Select the YTD cell that says (Blank), and type a couple of space
characters, then press the Enter key.


westy wrote:

Firstly - I am a big fan of this site, have searched previous questions and
just cant find/understand my problem.
My question - I want to obtain two averages from pivot table data displayed
in cells to the left of pivot table. They are an Average for the entire year
(Avg YTD B6:B8) and an Average for one season (Avg Aut C6:C8) against each
Name(A6:A8) from the Pivot table(D3:J17). The PT has two Field columns,
Season(E3) with two items Aut(E4) and Sum(H4) and Game(F3) with 6 items,
Games 1 - 3 for both seasons(E5:J5). Example Below

A B C D E F G H
I J
3 Runs Season Game
4 Aut Sum
5 Name Avg YTD Avg Aut Name 3 2 1 3 2 1
6 Kym ?? ?? Kym -6 5 4 8 6 7
7 Jimmy ?? ?? Jimmy 13 31 5 1 11 5
8 Craig ?? ?? Craig 15 2 11 8 19 17

So I want to display the average for the entire year (both seasons - Aut &
Sum) in Avg YTD and only for one season in Avg Aut. Also it needs to still
capture the averages as the PT updates and grows larger when the PT cells
expand to the left. More games will be added to the current season which in
this example will be Aut.

I have chosen to place the formulas outside and to the left of PT for
formatting reasons. I am happy to have them inside PT if they can be
displayed to the left. Also I want to maintain PT data and layout as in
example. Using 2003 version.

I hope I have explained this clearly and look forward to the always talented
response.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Average Calculations from Pivot Tables - Get Pivot Data? Calc

Am having some trouble with this, have no problem with pivot change you have
suggested however what is the exact range or cell that I am putting the PT
into on in Sheet two. The formuals return errors, I'm not sure if pivot cells
is where pivot is meant to be pasted according to your formula ie what should
be in Sheet 2 A4

Also I tried the get pivot function on my existing layout - just entering =
and then clicking the average subtotal cell - the resulting formula was an
error.
"Debra Dalgleish" wrote:

The subtotals can't be moved to the left of the items, and to extract
the data, e.g. Avg YTD, from the pivot table with a GetPivotData
formula, the values must be visible in the pivot table.

You could make a copy of your pivot table on another worksheet, with a
setup as I described.
Then, in the cells to the left of you main pivot table, use GetPivotData
formulas to extract the required averages from the second pivot table.

For example, with the second pivot table on Sheet2, and the name Kym in
cell A6, enter this formula in cell B6:

=GETPIVOTDATA(Sheet2!$A$4,$A6 & " YTD[' ';Average]")

Put the season name, Aut, in cell C4
In cell C6, enter the formula:

=GETPIVOTDATA(Sheet2!$A$4,$A6 &" Season[" &C$4 &";Average]")

westy wrote:
This result changed the layout of PT and placed the subtotals on the right of
data. Also I do not want the subtotal of both seasons, only one season and
YTD.
The resulting layout should be

Name,YTD AV, Season AV, Pivot data (Game and Season)

So is there any way to have subtotals on left. I want to keep the layout of
pivot and Avgs as per example for formatting/printing reasons.

"Debra Dalgleish" wrote:


This will create an average for each season, and an overall average:

Double-click on the Season field button, and for Subtotals, choose
Average, then click OK
In the source data, add a column with the heading YTD, and leave all the
cells blank in that column.
Refresh the pivot table, and add the YTD field to the column area,
before Season
Double-click on the YTD field button, and for Subtotals, choose Average,
then click OK
Select the YTD cell that says (Blank), and type a couple of space
characters, then press the Enter key.


westy wrote:

Firstly - I am a big fan of this site, have searched previous questions and
just cant find/understand my problem.
My question - I want to obtain two averages from pivot table data displayed
in cells to the left of pivot table. They are an Average for the entire year
(Avg YTD B6:B8) and an Average for one season (Avg Aut C6:C8) against each
Name(A6:A8) from the Pivot table(D3:J17). The PT has two Field columns,
Season(E3) with two items Aut(E4) and Sum(H4) and Game(F3) with 6 items,
Games 1 - 3 for both seasons(E5:J5). Example Below

A B C D E F G H
I J
3 Runs Season Game
4 Aut Sum
5 Name Avg YTD Avg Aut Name 3 2 1 3 2 1
6 Kym ?? ?? Kym -6 5 4 8 6 7
7 Jimmy ?? ?? Jimmy 13 31 5 1 11 5
8 Craig ?? ?? Craig 15 2 11 8 19 17

So I want to display the average for the entire year (both seasons - Aut &
Sum) in Avg YTD and only for one season in Avg Aut. Also it needs to still
capture the averages as the PT updates and grows larger when the PT cells
expand to the left. More games will be added to the current season which in
this example will be Aut.

I have chosen to place the formulas outside and to the left of PT for
formatting reasons. I am happy to have them inside PT if they can be
displayed to the left. Also I want to maintain PT data and layout as in
example. Using 2003 version.

I hope I have explained this clearly and look forward to the always talented
response.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default Average Calculations from Pivot Tables - Get Pivot Data? Calc

You're welcome.
The sample formula was based on a pivot table that started in cell A2,
and had a heading in cell A4.
There's a problem with the automatically generated GetPivotData formula
if you're using custom subtotals. It creates a formula like this:
=GETPIVOTDATA($A$4,"Kym YTD[' ';Data,Average]")
and you have to remove the Data, portion, to get this:

=GETPIVOTDATA($A$4,"Kym YTD[' ';Average]")

westy wrote:
Am having some trouble with this, have no problem with pivot change you have
suggested however what is the exact range or cell that I am putting the PT
into on in Sheet two. The formuals return errors, I'm not sure if pivot cells
is where pivot is meant to be pasted according to your formula ie what should
be in Sheet 2 A4

Also I tried the get pivot function on my existing layout - just entering =
and then clicking the average subtotal cell - the resulting formula was an
error.
"Debra Dalgleish" wrote:


The subtotals can't be moved to the left of the items, and to extract
the data, e.g. Avg YTD, from the pivot table with a GetPivotData
formula, the values must be visible in the pivot table.

You could make a copy of your pivot table on another worksheet, with a
setup as I described.
Then, in the cells to the left of you main pivot table, use GetPivotData
formulas to extract the required averages from the second pivot table.

For example, with the second pivot table on Sheet2, and the name Kym in
cell A6, enter this formula in cell B6:

=GETPIVOTDATA(Sheet2!$A$4,$A6 & " YTD[' ';Average]")

Put the season name, Aut, in cell C4
In cell C6, enter the formula:

=GETPIVOTDATA(Sheet2!$A$4,$A6 &" Season[" &C$4 &";Average]")

westy wrote:

This result changed the layout of PT and placed the subtotals on the right of
data. Also I do not want the subtotal of both seasons, only one season and
YTD.
The resulting layout should be

Name,YTD AV, Season AV, Pivot data (Game and Season)

So is there any way to have subtotals on left. I want to keep the layout of
pivot and Avgs as per example for formatting/printing reasons.

"Debra Dalgleish" wrote:



This will create an average for each season, and an overall average:

Double-click on the Season field button, and for Subtotals, choose
Average, then click OK
In the source data, add a column with the heading YTD, and leave all the
cells blank in that column.
Refresh the pivot table, and add the YTD field to the column area,
before Season
Double-click on the YTD field button, and for Subtotals, choose Average,
then click OK
Select the YTD cell that says (Blank), and type a couple of space
characters, then press the Enter key.


westy wrote:


Firstly - I am a big fan of this site, have searched previous questions and
just cant find/understand my problem.
My question - I want to obtain two averages from pivot table data displayed
in cells to the left of pivot table. They are an Average for the entire year
(Avg YTD B6:B8) and an Average for one season (Avg Aut C6:C8) against each
Name(A6:A8) from the Pivot table(D3:J17). The PT has two Field columns,
Season(E3) with two items Aut(E4) and Sum(H4) and Game(F3) with 6 items,
Games 1 - 3 for both seasons(E5:J5). Example Below

A B C D E F G H
I J
3 Runs Season Game
4 Aut Sum
5 Name Avg YTD Avg Aut Name 3 2 1 3 2 1
6 Kym ?? ?? Kym -6 5 4 8 6 7
7 Jimmy ?? ?? Jimmy 13 31 5 1 11 5
8 Craig ?? ?? Craig 15 2 11 8 19 17

So I want to display the average for the entire year (both seasons - Aut &
Sum) in Avg YTD and only for one season in Avg Aut. Also it needs to still
capture the averages as the PT updates and grows larger when the PT cells
expand to the left. More games will be added to the current season which in
this example will be Aut.

I have chosen to place the formulas outside and to the left of PT for
formatting reasons. I am happy to have them inside PT if they can be
displayed to the left. Also I want to maintain PT data and layout as in
example. Using 2003 version.

I hope I have explained this clearly and look forward to the always talented
response.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculations between pivot tables jigger Excel Discussion (Misc queries) 3 November 17th 06 08:28 PM
Pivot table calc using average in summed field cereldine Excel Discussion (Misc queries) 0 June 13th 06 11:55 AM
Calculations in pivot tables Kathy P Excel Discussion (Misc queries) 0 April 7th 06 12:11 AM
Average of count in pivot tables Dan in NY Excel Worksheet Functions 0 August 17th 05 11:31 PM
Calculations using totals generated in Pivot Tables fnov Excel Discussion (Misc queries) 0 March 3rd 05 07:17 AM


All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"