+ Reply to Thread
Results 1 to 6 of 6

Moving 16 week Average

  1. #1
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Moving 16 week Average

    Hi all,

    Let me describe what help I am looking for.

    I want to create a Driver Performance dashboard around the data I have in the attachment.

    So, I want to setup a page with a combo box that I would select a driver name, this in turn would display details of this driver on this page. One thing I want to do is compare the selected driver to other drivers on the same shift and compare average hours per Work order which is the WK Avg column.

    I want to compare only the last 16 weeks of the data, so I am looking at how to create a "moving average" on my data as I add data every week.

    I then want to chart all the drivers on the same shift and compare to the driver selected from the combo box for the past 16 weeks.

    I hope this makes sense!
    Attached Files Attached Files
    ==========
    Bigroo1958
    Austin, Texas
    ==========

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Moving 16 week Average

    =AVERAGE(IF((DriverAvgs[Name]=$A4)*(DriverAvgs[Weeknum]>=$B$2)*(DriverAvgs[Weeknum]<=$A$2),DriverAvgs[[Mon]:[Sat]])) as array formula
    Attached Files Attached Files

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Moving 16 week Average

    You're already calculating an average of an average, in your Wk Avg column. Presumably you are intending to average the weekly averages, in your "Moving 16 Week Average" measure? This won't give you truly accurate results.

    You'd be better recording true source data - so each row in your data would record the Driver Name, Date, Shift, Location, Route, # Work Orders and Hours Worked. It would make more sense to have one row per day / shift, rather than one row per week.

    With the data shaped like that, and a 'Date' table added, you could easily use Power Pivot to create a "Moving 16 Week Average" measure, using DAX:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    With these measures in your Data Model, it's fairly easy to layout your report as you wish.

    See attached file for a worked example (I've calculated notional Hours / Work Orders from your data, to demonstrate the concept)
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Moving 16 week Average

    Hi Olly,

    Ok, thanks for your reply and thoughts and your example. I will digest what you have outlined and get back to you with any questions.

    Tim201110,
    I appreciate your reply as well, I will review your formula later today!
    Thanks

  5. #5
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Moving 16 week Average

    Hi Tim201110,

    I have had time to review your formula and it does give me a 16 week average as requested.
    So, now my next question is how can the formula then give me a weekly total of each shift within the 16 week average for charting each shift?
    Please see my attachment for my desired output.

    Thanks

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Moving 16 week Average

    =AVERAGE(IF((DriverAvgs[Weeknum]=$B2)*(DriverAvgs[Shift]=C$1),DriverAvgs[[Mon]:[Sat]]))
    B2 - number!!!, C1- shift

+ 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. Totaling Moving Values by Week
    By scruz9 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-14-2016, 05:29 PM
  2. Replies: 1
    Last Post: 10-20-2014, 03:20 PM
  3. Replies: 0
    Last Post: 05-06-2013, 12:15 PM
  4. [SOLVED] Moving average/average function/adjustable length
    By Lv27 in forum Excel General
    Replies: 3
    Last Post: 08-16-2012, 09:43 AM
  5. Charts 5 day moving average, 10 day moving average
    By monalisa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2008, 09:50 PM
  6. Moving average of a moving average in the same cell
    By philroberts1983 in forum Excel General
    Replies: 8
    Last Post: 09-16-2008, 07:36 AM
  7. [SOLVED] Moving week numbers
    By Bob in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-03-2005, 06:35 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