How to calculate unweighted averages in Excel PivotTable? The Next CEO of Stack OverflowExcel...
Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico
Shortening a title without changing its meaning
Gödel's incompleteness theorems - what are the religious implications?
Was the Stack Exchange "Happy April Fools" page fitting with the 90s code?
How to pronounce fünf in 45
Finitely generated matrix groups whose eigenvalues are all algebraic
Early programmable calculators with RS-232
Strange use of "whether ... than ..." in official text
Could a dragon use its wings to swim?
Arrows in tikz Markov chain diagram overlap
Are British MPs missing the point, with these 'Indicative Votes'?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Direct Implications Between USA and UK in Event of No-Deal Brexit
How can the PCs determine if an item is a phylactery?
Read/write a pipe-delimited file line by line with some simple text manipulation
Why does freezing point matter when picking cooler ice packs?
Car headlights in a world without electricity
How to find if SQL server backup is encrypted with TDE without restoring the backup
How to implement Comparable so it is consistent with identity-equality
Gauss' Posthumous Publications?
Why did early computer designers eschew integers?
Compensation for working overtime on Saturdays
Avoiding the "not like other girls" trope?
How badly should I try to prevent a user from XSSing themselves?
How to calculate unweighted averages in Excel PivotTable?
The Next CEO of Stack OverflowExcel file with PivotTables - reduce sizeExcel 2007 pivot table does not aggregate properlyAdding multiple value columns to a pivot tableEXCEL: Want to incorporate two charts in one line graph (with averages)Average for every n row in ExcelCalculating averages for every n rows with missing dataHow do you sort by row instead of column in Excel tables?Excel - Pivot Table - Using Grand Totals/Creating New ColumnCannot group field in Excel PivotTableHow do I add custom, dynamic time period averages to Excel Pivot Table?
I often make PivotTables in which each row contains a number of per-person average measures. I then want to look at the unweighted column average for each measure, and usually make some kind of chart from these.
Because my individual cells are often averaged from different numbers of data points, the Grand Total row ends up being a weighted average, which I’m not interested in. So I usually make my own average row a few rows above the table to use for my charts.
That’s not too much work, but there’s another problem. I often add a few more people’s worth of data to the PivotTables’ source, then refresh the tables. This means my average row needs to be updated to encompass more rows from the PivotTable. Not a huge deal with one table, but when I have lots of them across lots of sheets, I have to do find/replace on a whole bunch of formulas.
So: is there a way to automatically get unweighted column averages in a PivotTable, such that when the table is refreshed, the averages
- don’t change locations and
- encompass the newly added (or removed) data
Thanks
microsoft-excel pivot-table
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I often make PivotTables in which each row contains a number of per-person average measures. I then want to look at the unweighted column average for each measure, and usually make some kind of chart from these.
Because my individual cells are often averaged from different numbers of data points, the Grand Total row ends up being a weighted average, which I’m not interested in. So I usually make my own average row a few rows above the table to use for my charts.
That’s not too much work, but there’s another problem. I often add a few more people’s worth of data to the PivotTables’ source, then refresh the tables. This means my average row needs to be updated to encompass more rows from the PivotTable. Not a huge deal with one table, but when I have lots of them across lots of sheets, I have to do find/replace on a whole bunch of formulas.
So: is there a way to automatically get unweighted column averages in a PivotTable, such that when the table is refreshed, the averages
- don’t change locations and
- encompass the newly added (or removed) data
Thanks
microsoft-excel pivot-table
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Should this be for Excel 2007?
– Ivo Flipse♦
Feb 15 '10 at 19:26
add a comment |
I often make PivotTables in which each row contains a number of per-person average measures. I then want to look at the unweighted column average for each measure, and usually make some kind of chart from these.
Because my individual cells are often averaged from different numbers of data points, the Grand Total row ends up being a weighted average, which I’m not interested in. So I usually make my own average row a few rows above the table to use for my charts.
That’s not too much work, but there’s another problem. I often add a few more people’s worth of data to the PivotTables’ source, then refresh the tables. This means my average row needs to be updated to encompass more rows from the PivotTable. Not a huge deal with one table, but when I have lots of them across lots of sheets, I have to do find/replace on a whole bunch of formulas.
So: is there a way to automatically get unweighted column averages in a PivotTable, such that when the table is refreshed, the averages
- don’t change locations and
- encompass the newly added (or removed) data
Thanks
microsoft-excel pivot-table
I often make PivotTables in which each row contains a number of per-person average measures. I then want to look at the unweighted column average for each measure, and usually make some kind of chart from these.
Because my individual cells are often averaged from different numbers of data points, the Grand Total row ends up being a weighted average, which I’m not interested in. So I usually make my own average row a few rows above the table to use for my charts.
That’s not too much work, but there’s another problem. I often add a few more people’s worth of data to the PivotTables’ source, then refresh the tables. This means my average row needs to be updated to encompass more rows from the PivotTable. Not a huge deal with one table, but when I have lots of them across lots of sheets, I have to do find/replace on a whole bunch of formulas.
So: is there a way to automatically get unweighted column averages in a PivotTable, such that when the table is refreshed, the averages
- don’t change locations and
- encompass the newly added (or removed) data
Thanks
microsoft-excel pivot-table
microsoft-excel pivot-table
edited Feb 15 '10 at 19:26
Ivo Flipse♦
21.9k2796145
21.9k2796145
asked Feb 15 '10 at 16:35
yonatronyonatron
965
965
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Should this be for Excel 2007?
– Ivo Flipse♦
Feb 15 '10 at 19:26
add a comment |
Should this be for Excel 2007?
– Ivo Flipse♦
Feb 15 '10 at 19:26
Should this be for Excel 2007?
– Ivo Flipse♦
Feb 15 '10 at 19:26
Should this be for Excel 2007?
– Ivo Flipse♦
Feb 15 '10 at 19:26
add a comment |
1 Answer
1
active
oldest
votes
This is a bit kludgy but it works.
If you have a single 'category' (eg person), you can just use AverageIf in the following example. If you have multiple criteria (eg person, product or gender, or hometown) you need AverageifS (plural - only available from Excel 2007).
You need a helper column next to your data. In here we will find:
- is this the first occurence of this person (plus second, third criteria)?
- if so, what is the average for that person?
- if not, BLANK (not zero).
So, if you person's name is in column A, your value to be measured is in column B, row 1 is headings and row 2 to 1000 is data, in cell C2 you need a formula like this:
=IF(COUNTIF($A$2:A2,A2)=1,AVERAGEIF($A$2:$A$1000,A2,$B$2:$B$1000),"")
If you have two criteria (eg person and product, region, or whatever), extend this using COUNTIFS and AVERAGEIFS (your measured value is now in column C, and note this becomes the first argument of the averageifS, not the last):
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,AVERAGEIF($C$1:$C$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2),"")
Now you have a column where each person's average is displayed exactly once.
Include a heading for this extra helper column ("Personal average").
Change the source of your pivot table to include this extra data and refresh.
INclude the extra column and make sure you summarise it by average rather than sum. Now your subtotals per category or your grand totals (if you have no higher-level categories) will be accurate, since in every case the average for each person is simply the average of a single number which is already calculated, so the weighting has been suppressed.
I know it's a bit klunky but when done the finished formula can always be copied down as you add data (or use a Table so Excel does that for you), and the result is part of your pivot table so you can easily produce a single report.
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f109164%2fhow-to-calculate-unweighted-averages-in-excel-pivottable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is a bit kludgy but it works.
If you have a single 'category' (eg person), you can just use AverageIf in the following example. If you have multiple criteria (eg person, product or gender, or hometown) you need AverageifS (plural - only available from Excel 2007).
You need a helper column next to your data. In here we will find:
- is this the first occurence of this person (plus second, third criteria)?
- if so, what is the average for that person?
- if not, BLANK (not zero).
So, if you person's name is in column A, your value to be measured is in column B, row 1 is headings and row 2 to 1000 is data, in cell C2 you need a formula like this:
=IF(COUNTIF($A$2:A2,A2)=1,AVERAGEIF($A$2:$A$1000,A2,$B$2:$B$1000),"")
If you have two criteria (eg person and product, region, or whatever), extend this using COUNTIFS and AVERAGEIFS (your measured value is now in column C, and note this becomes the first argument of the averageifS, not the last):
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,AVERAGEIF($C$1:$C$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2),"")
Now you have a column where each person's average is displayed exactly once.
Include a heading for this extra helper column ("Personal average").
Change the source of your pivot table to include this extra data and refresh.
INclude the extra column and make sure you summarise it by average rather than sum. Now your subtotals per category or your grand totals (if you have no higher-level categories) will be accurate, since in every case the average for each person is simply the average of a single number which is already calculated, so the weighting has been suppressed.
I know it's a bit klunky but when done the finished formula can always be copied down as you add data (or use a Table so Excel does that for you), and the result is part of your pivot table so you can easily produce a single report.
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
add a comment |
This is a bit kludgy but it works.
If you have a single 'category' (eg person), you can just use AverageIf in the following example. If you have multiple criteria (eg person, product or gender, or hometown) you need AverageifS (plural - only available from Excel 2007).
You need a helper column next to your data. In here we will find:
- is this the first occurence of this person (plus second, third criteria)?
- if so, what is the average for that person?
- if not, BLANK (not zero).
So, if you person's name is in column A, your value to be measured is in column B, row 1 is headings and row 2 to 1000 is data, in cell C2 you need a formula like this:
=IF(COUNTIF($A$2:A2,A2)=1,AVERAGEIF($A$2:$A$1000,A2,$B$2:$B$1000),"")
If you have two criteria (eg person and product, region, or whatever), extend this using COUNTIFS and AVERAGEIFS (your measured value is now in column C, and note this becomes the first argument of the averageifS, not the last):
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,AVERAGEIF($C$1:$C$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2),"")
Now you have a column where each person's average is displayed exactly once.
Include a heading for this extra helper column ("Personal average").
Change the source of your pivot table to include this extra data and refresh.
INclude the extra column and make sure you summarise it by average rather than sum. Now your subtotals per category or your grand totals (if you have no higher-level categories) will be accurate, since in every case the average for each person is simply the average of a single number which is already calculated, so the weighting has been suppressed.
I know it's a bit klunky but when done the finished formula can always be copied down as you add data (or use a Table so Excel does that for you), and the result is part of your pivot table so you can easily produce a single report.
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
add a comment |
This is a bit kludgy but it works.
If you have a single 'category' (eg person), you can just use AverageIf in the following example. If you have multiple criteria (eg person, product or gender, or hometown) you need AverageifS (plural - only available from Excel 2007).
You need a helper column next to your data. In here we will find:
- is this the first occurence of this person (plus second, third criteria)?
- if so, what is the average for that person?
- if not, BLANK (not zero).
So, if you person's name is in column A, your value to be measured is in column B, row 1 is headings and row 2 to 1000 is data, in cell C2 you need a formula like this:
=IF(COUNTIF($A$2:A2,A2)=1,AVERAGEIF($A$2:$A$1000,A2,$B$2:$B$1000),"")
If you have two criteria (eg person and product, region, or whatever), extend this using COUNTIFS and AVERAGEIFS (your measured value is now in column C, and note this becomes the first argument of the averageifS, not the last):
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,AVERAGEIF($C$1:$C$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2),"")
Now you have a column where each person's average is displayed exactly once.
Include a heading for this extra helper column ("Personal average").
Change the source of your pivot table to include this extra data and refresh.
INclude the extra column and make sure you summarise it by average rather than sum. Now your subtotals per category or your grand totals (if you have no higher-level categories) will be accurate, since in every case the average for each person is simply the average of a single number which is already calculated, so the weighting has been suppressed.
I know it's a bit klunky but when done the finished formula can always be copied down as you add data (or use a Table so Excel does that for you), and the result is part of your pivot table so you can easily produce a single report.
This is a bit kludgy but it works.
If you have a single 'category' (eg person), you can just use AverageIf in the following example. If you have multiple criteria (eg person, product or gender, or hometown) you need AverageifS (plural - only available from Excel 2007).
You need a helper column next to your data. In here we will find:
- is this the first occurence of this person (plus second, third criteria)?
- if so, what is the average for that person?
- if not, BLANK (not zero).
So, if you person's name is in column A, your value to be measured is in column B, row 1 is headings and row 2 to 1000 is data, in cell C2 you need a formula like this:
=IF(COUNTIF($A$2:A2,A2)=1,AVERAGEIF($A$2:$A$1000,A2,$B$2:$B$1000),"")
If you have two criteria (eg person and product, region, or whatever), extend this using COUNTIFS and AVERAGEIFS (your measured value is now in column C, and note this becomes the first argument of the averageifS, not the last):
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,AVERAGEIF($C$1:$C$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2),"")
Now you have a column where each person's average is displayed exactly once.
Include a heading for this extra helper column ("Personal average").
Change the source of your pivot table to include this extra data and refresh.
INclude the extra column and make sure you summarise it by average rather than sum. Now your subtotals per category or your grand totals (if you have no higher-level categories) will be accurate, since in every case the average for each person is simply the average of a single number which is already calculated, so the weighting has been suppressed.
I know it's a bit klunky but when done the finished formula can always be copied down as you add data (or use a Table so Excel does that for you), and the result is part of your pivot table so you can easily produce a single report.
answered Feb 15 '10 at 19:06
AdamVAdamV
4,7431634
4,7431634
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
add a comment |
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Actually, I found easier ways to do this, using dynamic ranges in Excel. I’ll try and elaborate soon, in case other folks come by this question. Thanks for the help, though.
– yonatron
Mar 1 '10 at 15:49
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
Fair enough. I can see how you could use dynamic ranges to see the data in the PivotTable as an expanding source of data for a formula and calculate your averages outside the table. I was just trying to answer the question as asked, so that the averages were in the PT in the first place.
– AdamV
Mar 1 '10 at 21:14
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f109164%2fhow-to-calculate-unweighted-averages-in-excel-pivottable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Should this be for Excel 2007?
– Ivo Flipse♦
Feb 15 '10 at 19:26