+ Reply to Thread
Results 1 to 2 of 2

Calculated Field to get Percentage of Two Columns in a Pivot Table

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    Washington, United States
    MS-Off Ver
    Excel 2007
    Posts
    21

    Calculated Field to get Percentage of Two Columns in a Pivot Table

    Hello,

    I'm having an issue getting the correct results from a calculated field in a pivot table in Excel 2007.

    In column A I have "Business Name", in B I have a sum of the amount of lines a customer has, and C is a MAX of the number of employees the customer has at their location.

    In one example I have a business with sum 50 lines and max 30 employees but when I try to make the calculated field 50/30 (should equal 166%) i get 9.2% instead.

    The reason appears to be because there are 18 types of lines the customer has and 18 x max 30 = 540 and 50/540 is 9.2%. In the attached example it's all the same business location so the total number of employees (30) is the same for each row and each row in the raw data is a set of lines with similar features.

    I attached an example.

    Thank you!
    Attached Files Attached Files
    Last edited by mbhc77; 10-02-2013 at 07:58 PM.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Calculated Field to get Percentage of Two Columns in a Pivot Table

    You must do a calculation in your source table like so:
    =D2/COUNTIF($B$2:$B$19,$B$2:$B$19)
    and then you must change the calculated field to divide the base by your new field.

    If the employee numbers change by month then you have to change the formula to add the month as criteria as well.

+ 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. Calculated pivot table field using pivot table data in calculation
    By BrittleStar in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-10-2012, 05:35 PM
  2. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  3. Replies: 3
    Last Post: 02-23-2009, 10:07 AM
  4. Replies: 3
    Last Post: 06-06-2006, 12:10 AM
  5. Excel 2002 Pivot Table calculated field percentage.
    By ~Dave in forum Excel General
    Replies: 3
    Last Post: 08-03-2005, 02:05 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