Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-17-2008, 04:54 PM
Mike C
 
Posts: n/a
Pivot Table question: Creating a new field that calculates thedivision of one data field by another


I have a pivot table that includes the sum of sales (a data field) and
the count of sales (a data field) by product.

It looks like this.
sum of sales Count of units
Product a 100 8
product b 45 6
Etc.

I am trying to create another field that divides the sum of sales by
the count of units for each product (i.e. in a fourth column.

Is there an easy way to do this (within the pivot table). I tried
using the calculated field option, but didn't seem to find the way to
do it.

Also once I have created a calculated field that I no longer want, is
there a way to delete it.

Thanks for any suggestions.
Reply With Quote
  #2 (permalink)  
Old 05-17-2008, 06:10 PM
Nick Hodge
 
Posts: n/a
Re: Pivot Table question: Creating a new field that calculates the division of one data field by another

Mike

yes and yes. You do not give us version, but right clicking in the pivot
table should give you 'Formulas...' select calculated field and in the
dialog type a formula like you would normally

=Sales/Units

and click add. You may want to include an IF function if you have fields
with zero units to avoid #DIV0! errors.

if you want to delete it, slelect it via the same method and click delete.
(You can also just drag the new field off the grid so it will be available
later)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
web: www.excelusergroup.org
web: www.nickhodge.co.uk





"Mike C" <js2k111@yahoo.com> wrote in message
news:2831089f-7a4c-41c1-be44-03daede70a8f@k13g2000hse.googlegroups.com...
>
> I have a pivot table that includes the sum of sales (a data field) and
> the count of sales (a data field) by product.
>
> It looks like this.
> sum of sales Count of units
> Product a 100 8
> product b 45 6
> Etc.
>
> I am trying to create another field that divides the sum of sales by
> the count of units for each product (i.e. in a fourth column.
>
> Is there an easy way to do this (within the pivot table). I tried
> using the calculated field option, but didn't seem to find the way to
> do it.
>
> Also once I have created a calculated field that I no longer want, is
> there a way to delete it.
>
> Thanks for any suggestions.


Reply With Quote
  #3 (permalink)  
Old 05-17-2008, 06:31 PM
Debra Dalgleish
 
Posts: n/a
Re: Pivot Table question: Creating a new field that calculates thedivision of one data field by another

A calculated field will always use the Sum of the selected fields, even
if you have used a different function in the pivot table, such as Count.

As a workaround, you could add a column to the source data table, with a
heading of UnitCount. Enter a 1 in each row.
Then, refresh the pivot table, and add the UnitCount field to the data
area, as Sum.
Use the UnitCount field in the calculated field, instead of the Units field.

Mike C wrote:
> I have a pivot table that includes the sum of sales (a data field) and
> the count of sales (a data field) by product.
>
> It looks like this.
> sum of sales Count of units
> Product a 100 8
> product b 45 6
> Etc.
>
> I am trying to create another field that divides the sum of sales by
> the count of units for each product (i.e. in a fourth column.
>
> Is there an easy way to do this (within the pivot table). I tried
> using the calculated field option, but didn't seem to find the way to
> do it.
>
> Also once I have created a calculated field that I no longer want, is
> there a way to delete it.
>
> Thanks for any suggestions.



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

Reply With Quote
  #4 (permalink)  
Old 05-18-2008, 01:31 AM
Shane Devenshire
 
Posts: n/a
Re: Pivot Table question: Creating a new field that calculates the division of one data field by another

Hi Mike,

Here is another option which is most likely not applicable to the current
situation, but maybe...

If Count of Units = Count of Sales then you can add the field Sales again
and use the summary operation Average.

The problem here is that we can't see a sample of the source data and the
approach is dependent on that. In some cases a calculated field would be
appropriate, in others an additional field in the data area would be
appropriate, and in yet others the use of an average field. If you show us
some sample data and the desired results that would help immensely.

Cheers,
Shane Devenshire
Microsoft Excel MVP

"Mike C" <js2k111@yahoo.com> wrote in message
news:2831089f-7a4c-41c1-be44-03daede70a8f@k13g2000hse.googlegroups.com...
>
> I have a pivot table that includes the sum of sales (a data field) and
> the count of sales (a data field) by product.
>
> It looks like this.
> sum of sales Count of units
> Product a 100 8
> product b 45 6
> Etc.
>
> I am trying to create another field that divides the sum of sales by
> the count of units for each product (i.e. in a fourth column.
>
> Is there an easy way to do this (within the pivot table). I tried
> using the calculated field option, but didn't seem to find the way to
> do it.
>
> Also once I have created a calculated field that I no longer want, is
> there a way to delete it.
>
> Thanks for any suggestions.


Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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



All times are GMT. The time now is 04:23 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Personal Loans | Debt Help | Sprint Ringtones | Charity | Remortgaging



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114