+ Reply to Thread
Results 1 to 18 of 18

Averageifs

  1. #1
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Averageifs

    Hi I am using a table to extract data from a worksheet with the following formula

    =AVERAGEIFS(tblIncidentData[Time to Resolve (exc. Wkds & Hols)],tblIncidentData[Created Time],">="&$D$2,tblIncidentData[Created Time], "<="&$F$2,tblIncidentData[Priority],[@Priority],tblIncidentData[Category],"<>Exclusion",tblIncidentData[First Response Overdue Status],FALSE)

    Basically from my Incident table I am trying to pull back the average resolve time against the criteria set out, the Priority is being taken from the table I am extracting to

    However, I am just getting #VALUE???

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 pictures.

    Please read the yellow banner at the top of the screen. Act on its guidelines and post a SMALL sample sheet.

    Also, pleae update your profile to show your approximate geographical location and the Excel version(s) you are using.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Averageifs

    Have cribbed a version and attached (i think!)
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    The only thing wrong was that there are no values inside the date range... so no average to calculate! I added an IFERROR to hide errors:

    IFERROR(AVERAGEIFS(TblNewData[Time to Resolve (exc. Wkds & Hols)],TblNewData[Created Time],">="&$D$2,TblNewData[Created Time], "<="&$F$2,TblNewData[Priority],[@Priority],TblNewData[Category],"<>Exclusion",TblNewData[First Response Overdue Status],FALSE),"")
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Averageifs

    I've updated the dates and reloaded, you will see it still doesn't work
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Averageifs

    You have a formula in column P of the Incident sheet which refers to some external file which we don't have - hence it returns #REF! errors.

    Hope this helps.

    Pete

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    Overtype column P, as implied by Pete, and it's fine.

  8. #8
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Averageifs

    Bingo, yep got it

    Thanks

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  10. #10
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Averageifs

    It does work, but we get reference errors as we can not return times to resolve. if I manually put some values in that colum it works for P3 and p4, the other fail as you do not have a p1 for example in your table.

    =IFERROR(AVERAGEIFS(TblNewData[Time to Resolve (exc. Wkds & Hols)],TblNewData[Created Time],">="&$D$2,TblNewData[Created Time], "<="&$F$2,TblNewData[Priority],[@Priority],TblNewData[First Response Overdue Status],FALSE),"")

  11. #11
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Averageifs

    Actually, on this line, I am trying to work it based on something either being resolved or closed, so have a statement as follows:

    =IF(OR(tblIncidentData[@State]="Closed",tblIncidentData[@State]="Resolved"),AVERAGEIFS(tblIncidentData[Time to Resolve (exc. Wkds & Hols)],tblIncidentData[Created Time],">="&$D$2,tblIncidentData[Created Time], "<="&$F$2,tblIncidentData[Priority],[@Priority]))

    Can you not use OR statements with AverageIFS?

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    Yes... and no...

    It requires a different formula structure altogether. I'll post something in a few minutes. I can see what you need... I think...

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    How many status's (statii??) are there? Closed, Resolved and.....? If there are just 3, the third being "Open", then just add ,"<>Open" as the criterion instead of the or...

  14. #14
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Averageifs

    No there are up to 6 status (although the example only shows three).
    Attached Files Attached Files

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    So, an array formula is needed:

    IFERROR(AVERAGE(IF(TblNewData[Priority]=[@Priority],IF(TblNewData[Created Time]>=$D$2,IF(TblNewData[Created Time]<=$F$2,IF(TblNewData[First Response Overdue Status]=FALSE,IF(ISNUMBER(MATCH(TblNewData[State],{"Closed","Resolved"},0)),TblNewData[Time to Resolve (exc. Wkds & Hols)])))))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Averageifs

    Excellent thanks Glenn

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Averageifs

    You're welcome!!

  18. #18
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Averageifs

    Thanks for the rep, Pjcan, though I didn't do much to deserve it.

    Pete

+ 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] Averageifs
    By kent97 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2017, 02:40 AM
  2. AVERAGEIFS can you use it with an or.
    By Vokey9 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 02-26-2016, 05:05 PM
  3. [SOLVED] Averageifs
    By nd4spd in forum Excel General
    Replies: 7
    Last Post: 07-04-2014, 05:33 AM
  4. [SOLVED] Averageifs
    By mahershams in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-23-2014, 08:40 AM
  5. Averageifs.
    By lokpal.panwar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2014, 07:09 AM
  6. [SOLVED] MIN and MAX like an AVERAGEIFS?
    By superchill435 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-10-2012, 09:06 AM
  7. AverageIfs
    By DMAN11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2010, 05:31 PM

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