+ Reply to Thread
Results 1 to 11 of 11

Subtotal Percentage Calculation on a Row in a Pivot Table

  1. #1
    Registered User
    Join Date
    06-05-2014
    Location
    Iowa, USA
    MS-Off Ver
    2013
    Posts
    33

    Subtotal Percentage Calculation on a Row in a Pivot Table

    Hello,

    Attached is a sample file with a table of data as well as a pivot table. What I would like to do is have a new pivot column that calculates the percentage of the two previous columns of values. So in my example I would like column D to be a part of the pivot table but it should calculate B/C (B4/C4, B5/C5, B6/C6, etc). I want it to be a part of the pivot and not just a standard formula column because the slicer changes the size of the pivot and a standard formula column doesn't re-size dynamically as far as I know.

    Add row percentage subtotals.xlsx

    On a side note, how can the availability be more easily entered? is there a way to tell a pivot to use the value instead of sum, count, var, etc?? The availability hours are hard coded once for the week but don't change within the week.
    Last edited by AustinLe; 06-23-2015 at 11:10 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,375

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    Hi Austin,

    See if the attached is what you want. It is a Calculated Field in the Pivot.

    Also see: http://www.contextures.com/excel-piv...ted-field.html
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    Click into Pivot Table Options on the ribbon.

    Then Fields, items & Sets > Calculated Field

    Enter a name for your field, then double click 'Job Time', enter a / then double click 'Availability'. Click add and you'll see your new field appear in the PivotTable field list. Drag this into your 'Values' box then highlight the field and format as a percentage.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    With a calculated field

    excel 2013 => analyze, fields, items and settings

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    06-05-2014
    Location
    Iowa, USA
    MS-Off Ver
    2013
    Posts
    33

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    MarvinP, seasider89, and oeldere,

    Thanks for the lightning fast responses! MarvinP that is exactly what I was looking for. Seasider89, this is also very helpful information. Again, Oeldere very helpful. Thanks to all of you! Rep added

    I edited my original post with another small question regarding the input of data that doesn't fit the table format. I will add a better sample file. If that's an easily answered question I'd love some help on it!

    Add row percentage subtotals.xlsx
    Last edited by AustinLe; 06-23-2015 at 11:52 AM. Reason: thanking the others and adding new sample sheet

  6. #6
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    I'm not sure exactly what you mean by "doesn't fit the table format" exactly??

  7. #7
    Registered User
    Join Date
    06-05-2014
    Location
    Iowa, USA
    MS-Off Ver
    2013
    Posts
    33

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    Seasider,

    It's hard to explain exactly what i mean but its a convenience issue more than anything. Try to imagine the data sheet spans many people over many weeks who work on multiple projects a week (the ID column B). It can invite errors if they were to assign someone availability twice in the same week and thus the pivot will be wrong. It seems odd to have to input a weeks of availability in a table that records the time it takes to do a project. I'm trying to find a simple way to combine the two tables in my second sample attachment. I hope this helps but i get the feeling it might not :P

  8. #8
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    Yeah I'm still not 100% what you mean. If two tables works, I see no reason why not to do this.

  9. #9
    Registered User
    Join Date
    06-05-2014
    Location
    Iowa, USA
    MS-Off Ver
    2013
    Posts
    33

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    I cant get them to connect (error: the tables cant connect because they are damaged) am i to be combining them with a relationship?

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    in yellow the helpcolumns (which can be hidden).

    in green the result.

    see the attached file.

  11. #11
    Registered User
    Join Date
    06-05-2014
    Location
    Iowa, USA
    MS-Off Ver
    2013
    Posts
    33

    Re: Subtotal Percentage Calculation on a Row in a Pivot Table

    oeldere, that works. Thank you! Rep added and thread solved.

+ 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. Replies: 1
    Last Post: 12-23-2010, 08:44 AM
  2. Replies: 12
    Last Post: 05-15-2010, 03:02 AM
  3. pivot table percentage calculation
    By lilyximsu in forum Excel General
    Replies: 0
    Last Post: 03-16-2010, 01:53 PM
  4. Pivot table percentage calculation
    By Mr. Questions in forum Excel General
    Replies: 2
    Last Post: 09-19-2008, 09:33 AM
  5. display data as a percentage of a subtotal in excel pivot table
    By Fl pivot user in forum Excel General
    Replies: 2
    Last Post: 03-26-2005, 09:07 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