+ Reply to Thread
Results 1 to 6 of 6

Average for specific dates of gap time.

Hybrid View

rvancura Average for specific dates of... 03-16-2009, 01:36 PM
DonkeyOte Re: Average for specific... 03-16-2009, 01:46 PM
rvancura Re: Average for specific... 03-17-2009, 07:17 AM
DonkeyOte Re: Average for specific... 03-17-2009, 07:23 AM
rvancura Re: Average for specific... 03-17-2009, 07:56 AM
DonkeyOte Re: Average for specific... 03-17-2009, 08:00 AM
  1. #1
    Registered User
    Join Date
    09-25-2008
    Location
    Middlefield, Ohio
    Posts
    12

    Average for specific dates of gap time.

    Hi everyone,

    I would like to create an average function that will take an average of the Column labeled "Gap Time (Hours/Min/Sec)". I only want it to take the average for this for each new start date. These values will change daily so I was hoping that someone may help me write a function that will work when data changes instead of manually taking the average every time data is entered. I appreciate your help.

    -Ryan-
    Attached Files Attached Files
    Last edited by rvancura; 03-18-2009 at 01:54 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average for specific dates of gap time.

    Why not use a Pivot Table to do this for you -- see attached (2007 file format)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-25-2008
    Location
    Middlefield, Ohio
    Posts
    12

    Re: Average for specific dates of gap time.

    Quote Originally Posted by DonkeyOte View Post
    Why not use a Pivot Table to do this for you -- see attached (2007 file format)
    This is great. I haven't really worked with Pivot tables in the past. I tried recreating it on my own. However, I'm not sure how you added "months" and "years" to the "PivotTable Field List" and under "Column Labels" I'm not sure how you added "Values". I'll continue to research and try to figure this out. I appreciate any help and I am grateful for you assistance.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average for specific dates of gap time.

    In answer to your first question re: Months & Years - this is done by "Grouping"

    -- Select a Date as listed in your Row Label Field
    -- Right Click
    -- Select Group
    -- Select Days & Months & Years
    -- Click OK

    Re: Values - the Value field is set to Gap Time column but Field Setting is altered to AVERAGE (will default to COUNT I suspect) -- to Set to Average:

    -- Right click on the Column Header
    -- Choose "Value Field Settings"
    -- Select AVERAGE
    -- Click Number Format
    -- Select Custom
    -- in "Type box" enter: [hh]:mm:ss
    -- Click OK
    -- Click OK

    Done

  5. #5
    Registered User
    Join Date
    09-25-2008
    Location
    Middlefield, Ohio
    Posts
    12

    Re: Average for specific dates of gap time.

    Thank you again. Would you by any chance have a suggestion on how to create a function for the pivot table that would not count the the gap time if exceeds more than 5 hours?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average for specific dates of gap time.

    I don't have time at the moment to look at this in detail I'm afraid but off hand a quick solution may be to alter source data (Gap Time column) such that:

    L3:
    =IF((F3-H2)>TIME(5,0,0),"",F3-H2)
    copied down

    Refresh the PT (you will of course get DIV/0 error on the PT if there are no entries for a given day that are less than the 5 hour threshold)

+ 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