+ 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
    58

    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
    58

    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)

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