+ Reply to Thread
Results 1 to 4 of 4

AVERAGEIFS to only factor in lowest value instance of duplicates

  1. #1
    Registered User
    Join Date
    12-05-2019
    Location
    Leeds
    MS-Off Ver
    Excel 365
    Posts
    2

    AVERAGEIFS to only factor in lowest value instance of duplicates

    Hi, long time user of the forum but first post so please go easy.

    I’ve hit a roadblock creating a slightly complex AVERAGEIFS formula.

    I basically need to create an AVERAGEIF formula with multiple criteria, the challenge is I have some duplicate items where for these rows I only want to factor in the lowest respective value to the average. Suspect I need to utilise the MIN function but can’t quite seem to get it functioning correctly.

    I’ve attached an example sheet to help illustrate what I’m trying to achieve. It is the rank column which I want to capture the average for. A keyword may rank multiple times but I only want to include within the average calculation the lowest value. At present this isn’t factored (keyword column) into the included formulas.

    The sheet is a cut down example so the intention of the formula may not be fully obvious but with a much bigger data set in would likely more clear.

    Thanks in advance for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: AVERAGEIFS to only factor in lowest value instance of duplicates

    given the nature of your data, primarily the fact it is sorted such that the min of any given combination is always listed first, you might get away with the below Array:

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

    above would return 3.5, 5, 2, 2 & 7 for the Category 1 results.

    you could equally consider using a Pivot (with repeated labels), as an intermediate solution, to isolate the MIN values for each combination - against which you could apply an averageifs

  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: AVERAGEIFS to only factor in lowest value instance of duplicates

    An alternative approach would be to load your table of data to the data model, and create a DAX measure:

    Please Login or Register  to view this content.
    Now you can use Pivot Tables to report on your data, using this measure.

    See attached workbook for worked example.
    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
    Registered User
    Join Date
    12-05-2019
    Location
    Leeds
    MS-Off Ver
    Excel 365
    Posts
    2

    Re: AVERAGEIFS to only factor in lowest value instance of duplicates

    Thanks for the responses, was hoping there was a simple solution that I had missed. Short term I'm going to resort to the intermediary pivot table solution while I read up more around DAX measures.

+ 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. Deleting Duplicates of Second Instance
    By cjamps in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-07-2016, 11:27 AM
  2. [SOLVED] Add Duplicates and Save On Instance
    By hftechno in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2014, 03:01 PM
  3. [SOLVED] Count duplicates and duplicates with suffix as one instance
    By ruraljur0r in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2014, 12:38 AM
  4. Combing AVERAGEIFS and a criteria function that excludes duplicates
    By acillatem in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2013, 06:49 PM
  5. Highlighting all duplicates except the last instance
    By bopsgtir in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2013, 06:57 PM
  6. Replies: 6
    Last Post: 03-29-2012, 12:16 AM
  7. keep n duplicates not just a single instance - how
    By TopDogDave in forum Excel General
    Replies: 1
    Last Post: 11-13-2010, 10:55 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