+ Reply to Thread
Results 1 to 7 of 7

add my own formula to pivot table

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    3

    add my own formula to pivot table

    Hi all I was hoping someone here might be able to help me out with a pivot table I'm trying to make. what I want to do is add all the totals of the individual codes weights together and then divide it by the total by the total then multiply it by the fat.
    an example from the spread sheet I have attached would be adding all of the code 3's together which gives me 1828. then we take the weight 515 and divide it by the total which gives me 0.2817287 then multiply that by the fat % which in this case is 32.2% which gives me the result 0.447237724685498....
    I hope I have explained myself properly there is another step after this but I think I'm ok with that step.
    Thanks in advance for any help
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: add my own formula to pivot table

    Hi irishtrash,

    Welcome to the forum

    Check Calculated Field option in Pivot Table.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: add my own formula to pivot table

    Hi, Welcome to the forum.
    If you multiply 32.2 (As shown in the column without % sign) with 0.281..... you will get 9.07.... not 0.447 as you mentioned. how are you getting 0.44 please advise.
    Best Regards/VKS

  4. #4
    Registered User
    Join Date
    02-20-2014
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: add my own formula to pivot table

    I got that result from staring at the screen too long and my eyes going blury!! I made a mistake in that calculation.
    The calculated field option would work for me if it would let me select fields/cells from the original file when setting it up.

    I'm going to be getting these reports everyday so hoping to make it automated as in I'm looking to drop the up to date details in and refresh it and hey presto
    so looking for it to pull the original weight of each individual code and divide the total of that individual code into each line weight of that code....

    Pretty much I'm looking to work out the weighted average of fat % in each line using the total weight of that code used on any giving day.

    Thanks for advice and reply's

  5. #5
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: add my own formula to pivot table

    Have done some modifications to your pivot table.
    Please check the attachment and let me know if this is what you want.
    Best Regards/VKS
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-20-2014
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: add my own formula to pivot table

    Thanks for that VKS I have re-attached a the file some of the math is working out different to my calculations (I have just used product code 3 to show) .
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: add my own formula to pivot table

    Hie, It was my mistake in column F formula. Please check the attached.
    Best Regards/VKS
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] formula that brings up table like a pivot table
    By ea223 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2013, 12:46 AM
  2. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM
  3. Adding formula to active table and for pivot table in macro
    By Jerseynjphillypa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2012, 08:12 AM
  4. PLEASE DELETE this post
    By -EE- in forum Excel General
    Replies: 0
    Last Post: 02-22-2012, 07:46 PM
  5. Return pivot table range...not the data table, the PIVOT TABLE!
    By Air_Cooled_Nut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2008, 01:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1