+ Reply to Thread
Results 1 to 7 of 7

Dynamic Calculated Field in Pivot Table

  1. #1
    Registered User
    Join Date
    01-11-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    10

    Dynamic Calculated Field in Pivot Table

    Hello,

    I'm currently working with a Pivot table similar to the attached.

    I have added the column 'Sum of Target' by adding a calculated field (as this seemed the easiest way, if there are any other ways of inputting this information this might help), however currently the calculated field is a static value and so if I wanted to change the target value I would need to go into the calculated field settings. Ideally I would like this to reference cell E18 (the cell next to target) so it can be easily altered. However Excel doesn't seem to allow this.

    Does anyone have any suggestions?

    Any help would be appreciated.

    Kind regards,

    Oliver
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Dynamic Calculated Field in Pivot Table

    Hi Oliver,

    You just need to add a column into your data that references the target field, as per the example below...

    Example.xlsx

    Stephen

  3. #3
    Registered User
    Join Date
    01-11-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    10

    Re: Dynamic Calculated Field in Pivot Table

    Hi Stephen,

    Thanks for your reply.

    The only problem I'm having with this is that when I add additional sales for an existing sales person then it pulls the target across multiple times.

    Example Pivot updated.png
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    09-25-2015
    Location
    Nowy Tomysl, Poland
    MS-Off Ver
    2019, O365
    Posts
    398

    Re: Dynamic Calculated Field in Pivot Table

    I suggest such a solution
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Dynamic Calculated Field in Pivot Table

    Fair call. stasinek's correction to the formula works.

    The other way you could do it is by adding a macro that amends the calculated field when your target cell changes.

    Please Login or Register  to view this content.
    Stephen

  6. #6
    Registered User
    Join Date
    01-11-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    10

    Re: Dynamic Calculated Field in Pivot Table

    That worked really well.

    Thanks both for your help.

    One last question. Say if there was a salesman 6 who has made no sales this month. Is there also a way to have him show on the Pivot without having to input a sale of 0?

    Kind regards,

    Oliver

  7. #7
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Dynamic Calculated Field in Pivot Table

    Hi Oliver,

    I don't think so. Maybe you could have a list of all of your salesmen at the top of your data showing sales of 0? Or a check to see if you need to add them in with 0 sales?

    Stephen

+ 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] A pivot table field calculated using other field values as fields?
    By chrisf78 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 05-07-2015, 03:08 AM
  2. [SOLVED] Referring to a Sub-Field on Calculated Field Pivot Table Column?
    By figo12 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-27-2014, 02:02 PM
  3. 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
  4. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  5. Replies: 1
    Last Post: 04-12-2010, 01:01 PM
  6. Dynamic Table: Text in a Calculated Field?
    By ValerioOliveira in forum Excel General
    Replies: 4
    Last Post: 02-13-2008, 09:13 AM
  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