+ Reply to Thread
Results 1 to 6 of 6

Insert Calculated Field where source field is an Average

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    6

    Insert Calculated Field where source field is an Average

    Hi gang,

    My pivot table is driving me crazy; I'm trying to insert a calculated field to show profit, where the new value would be (COGS - CPA). The COGS value is summarized by AVERAGE in my pivot table. When I try to insert my calculated field, it treats that value as a SUM, and nothing I've tried will make it calculate off the AVERAGE.

    What I've tried
    Formula: = COGS-'CPA'

    And

    Formula: =AVERAGE(COGS)-'CPA'

    Still spits out the same result, the SUM of my COGS minus my CPA.

    How can I insert a calculated field where one of the source values is summarized by average?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Insert Calculated Field where source field is an Average

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    Since a PT is involved put your manually calculated results in the columns alongside the PT.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    6

    Post Re: Insert Calculated Field where source field is an Average

    Here's an example workbook, as requested.
    Attached Files Attached Files

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Insert Calculated Field where source field is an Average

    Hi,

    You can't do that just with a calculated field, unless you have Power Pivot. What you can do is add another column to the source data (let's call it Cogs Count) that simply returns 1 for each row, and then modify your calculated field formula to
    = ((COGS/'COGS count' )-CPA)*Conversions
    since COGS/'COGS count' will give you the average.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Insert Calculated Field where source field is an Average

    Solved! Thanks a million, you really made my life a lot easier

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Insert Calculated Field where source field is an Average

    You're welcome.

+ 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: 0
    Last Post: 08-15-2016, 02:07 PM
  2. Calculated Field showing average of whole team
    By Bishonen in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-10-2016, 09:26 AM
  3. Average error iin calculated field of Excel.
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2013, 10:17 AM
  4. Replies: 0
    Last Post: 11-01-2013, 11:45 AM
  5. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  6. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  7. Replies: 0
    Last Post: 07-10-2010, 03:02 PM

Tags for this Thread

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