+ Reply to Thread
Results 1 to 3 of 3

Calculated fields based on the count of a field

  1. #1
    Registered User
    Join Date
    11-07-2014
    Location
    Ottawa, Canada
    MS-Off Ver
    2010
    Posts
    62

    Calculated fields based on the count of a field

    Hi All, so I have a pivot table that is based on a query to a database, that I need to calculate what is called Hours Per RO.

    This is calculated by taking Invoice Hours divided by total number of work orders. InvoiceHours / #ofWorkOrders.

    I have the sum of invoice hours working, but I need to divide it by the count of work orders. How do I create a calculated field to do this?

    I tried to do =invoiceHours/ COUNT(#ofWorkOrders) but it gives me a count of 1 for the # of work orders/

    Thank you
    Last edited by FernTurpin; 02-07-2019 at 05:56 PM.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Calculated fields based on the count of a field

    Can you attach a sample workbook showing some data and your expected output mocked-up.

    Go Advanced -> Manage Attachments -> Upload

  3. #3
    Registered User
    Join Date
    11-07-2014
    Location
    Ottawa, Canada
    MS-Off Ver
    2010
    Posts
    62

    Re: Calculated fields based on the count of a field

    Hi, thanks for the reply. The first issue is that I am working on a Dealer Management system built for car dealerships (POS + accounting, day to day, etc). So to get the data, I use a query off of the actual database. I don't get to "touch" the database. So I run an Excel Query based on an external connection. Since the amount of data is years and years worth, I cant pull it to a sheet, as that would overload the limits of excel. So we run these Queries and then base our Pivot tables on the queries.

    That being said, what I can attach is the results of the Pivot table, and then an explanation of what I am trying to achieve.

    See file Test for Calculated field. Thank you
    Attached Files Attached Files

+ 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] How to create a Calculated Field based off two Avg fields in a Pivot table?
    By rcocalm in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-22-2014, 03:18 AM
  3. [SOLVED] Reference a pivot field as variable in calculated fields - VBA
    By limalf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2013, 07:52 AM
  4. Replies: 0
    Last Post: 11-01-2013, 11:45 AM
  5. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  6. Replies: 1
    Last Post: 10-02-2006, 09:56 AM
  7. [SOLVED] Calculated Field in Pivot Table Based on Two Counted Fields
    By cmlits in forum Excel General
    Replies: 1
    Last Post: 03-30-2006, 12:50 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