+ Reply to Thread
Results 1 to 2 of 2

Calculated field

  1. #1
    Registered User
    Join Date
    04-16-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    1

    Unhappy Calculated field

    I have a pivot table for class marks on 6 subjects
    For each student I want to an average of the students best top three marks
    Do I use a calculated field for this or can I loop through using VBA code ?

    I noticed excel has a LARGE keyword but that works in the spreadsheet formulas, I want this on the pivot table

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

    Re: Calculated field

    Hello pinjisi and Welcome to Excel Forum.
    According to the people who maintain a web site on Excel functions, the only function that will work in a calculated field is SUM (although they go on to show the IF function being used). Therefore I don't think that you'll be able to resolve this issue with a calculated field.
    I am going to offer two formula based solutions.
    1) Append you pivot table with a non-pivot table column populated with the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This option is utilized on sheet 2 of the attached file. Notice that the formula is copied down to row 20 so that if the pivot table is expanded the formula will appear to work as you would expect of a calculated field.
    2) Append the actual data table (sheet 1) with a column populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The column, Average (Top 3), is then included in the values field of the pivot table on sheet 3. One advantage of this approach is that as the table is expanded the formula in the Average (Top 3) column will expand also.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. difference between calculated field and calculated column in PowerpIvot
    By stephme55 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2016, 06:05 PM
  3. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  4. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  5. Replies: 2
    Last Post: 03-06-2009, 11:49 AM
  6. [SOLVED] PivotTable:Using a calculated field result in another calculated f
    By Alice in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-08-2006, 12:25 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

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