+ Reply to Thread
Results 1 to 4 of 4

Pivot Calculated formula

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Pivot Calculated formula

    I have a pivot that consolidates a lot of information. In the end, I'm interested in two main flavors, EA and Non-EA: For each Program, Facility, and Description Type I need to take the EA amount and divide it by the sums of EA and Non-EA. For instance, in the Example, in Program IV-E, in "Child Placing Agency", we have Basic EA and Basic Non-EA, Intense EA and Intense Non-EA, etc. Out in Column H I have my tentative formula, which I'd like to be a calculated field in my pivot. I'm stuck with how to proceed from here.

    To add a wrinkle, not every EA has a Non-EA. See the values I put in red. There we have 3 Non-EA fields, with no EA counterpart, so the resulting percentage should be Zero.

    As I mentioned, I'm stuck at this point. Any help or advice would be greatly appreciated.

    Thanks,
    John
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Pivot Calculated formula

    I modified your formula so that it would be more general so that you could copy it across and then double click it down (see attached file). The formula also accounts for the rows that you highlighted in red, so as to give a value of 0.00% rows. I did find two discrepancies, where the Non-EA line was above the EA line, which I highlighted in green. I would suggest switching the position of those lines, so that the EA line precedes the Non-EA line, in order to get the formula to work. I also found another case, under the Foster Family facility, of an orphan Non-EA line which would not fit the rule, and marked it in orange. I feel like this may be a case where some data was omitted, if not it presents a case the will need further study. The formula used is:
    Please Login or Register  to view this content.
    I don't believe that you will be able to use a calculated field, however using the format painter the additional columns can be made to look similar to the Pivot Table itself.

    Pivot Table Extension.xlsx

    Let me know if you have any questions.
    Last edited by JeteMc; 10-09-2015 at 03:14 PM. Reason: Ammended Formula

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Pivot Calculated formula

    Thanks JeteMc. Sorry it took me so long to reply; I've been on a mission trip and just returned. It's funny (or shows I'm on the right track) that your notes and suggestions coincide with the changes I made since starting this post.

    I can make it all work by keeping my formulas outside of my pivot table, just hoped there was a way to do it via a calculated field. Thanks for trying.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Pivot Calculated formula

    You're welcome, and thank you for the feedback. Hope that you have a nice day.

+ 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] Using a MIN, MAX formula on a calculated field in a pivot table
    By fhaberland in forum Excel General
    Replies: 1
    Last Post: 01-20-2016, 06:07 AM
  2. [SOLVED] Creating a formula in a pivot table while using another calculated item in the pivot
    By mvhs1073933 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-10-2015, 12:44 PM
  3. [SOLVED] Formula for Calculated Field in Pivot Table
    By reshi in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-19-2015, 02:15 AM
  4. ----------
    By MGadAllah in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-30-2015, 04:13 AM
  5. [SOLVED] Calculated Formula Pivot Table Values - DSO
    By jmcconville18 in forum Excel General
    Replies: 4
    Last Post: 06-26-2014, 11:41 AM
  6. [SOLVED] Pivot - Calculated field formula?
    By DublinMeUp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2012, 06:03 PM
  7. [SOLVED] pivot table formulas for calculated field or calculated item
    By Vicky in forum Excel General
    Replies: 3
    Last Post: 06-06-2006, 12:10 AM

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