+ Reply to Thread
Results 1 to 9 of 9

Custom formula in pivot table

  1. #1
    Registered User
    Join Date
    08-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Custom formula in pivot table

    Hi,

    Is it possible to create a custom formula column on a pivot table?

    I tried to create manually and put it beside the pivot table column. It works but it does not allow sorting due to pivot table issue.

    Please advise if this is possible.

    Illustration
    Pivot Table
    A 100 200 | (need to know the right way to create this new column to calculate Col3/Col2 data)
    B 200 300|
    C 300 600 |
    Last edited by raym0nd; 08-18-2010 at 09:23 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Custom formula in pivot table

    Hi,

    Take a look here at these tutorials on Pivot Tables

    http://www.contextures.com/xlPivot10.html
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    08-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Custom formula in pivot table

    Quote Originally Posted by oldchippy View Post
    Hi,

    Take a look here at these tutorials on Pivot Tables

    http://www.contextures.com/xlPivot10.html
    Hi oldchippy,

    Somehow the scenario is different as compared to mine as the pivot table format is different and also it doesn’t come with division formula.

    Currently my Pivot Table is like the one below and the data is expandable:

    Please Login or Register  to view this content.
    Currently my Column 3 is embed with formula like =C2/B2 . When I try to sort via Data, Sum of field 1 and Sum of field2 column, it is ok but when I try to sort Column3, it gave me this error:

    http://img594.imageshack.us/img594/1636/excelerror.jpg

    I am wondering is it possible to add in the division formula into the pivot table as I think it should be able to sort if the formula is inside the pivot table.

  4. #4
    Registered User
    Join Date
    08-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Custom formula in pivot table

    bump.........

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Custom formula in pivot table

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  6. #6
    Registered User
    Join Date
    08-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Custom formula in pivot table

    Quote Originally Posted by arthurbr View Post
    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hi,

    I have attached the sample data sheet that contain of data, pivot table and the after effect.

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Custom formula in pivot table

    In XL 2003 I added a calculated field in the PT ( via the PT toolbar), and sorted the division column via Data - Sort - result attached
    I don't know if the same applies to 2007 - sorry
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Custom formula in pivot table

    Thanks arthurbr for your help Finally I learn a new calculated field feature and it works. I have added good reputation to your account :D

  9. #9
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Custom formula in pivot table

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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