Duplicate Values

Options

I have a function that’s returning the top 5 values. However when two or more lines have the same value, its only returning the first fty in the list. So as below, instead of returning APU002 as the second with 3 occurrences, it lists A2B001 a second time.

Formula used is =INDEX(COLLECT(Fty$1:Fty$5, Occurrences$1:Occurrences$5, LARGE(Occurrences$1:Occurrences$5, 1)), 1)

Answers

  • Peelercm
    Options

    I figured it out and its ridiculously simple, naturally. I added a helper column with random decimals and a "helper + Occurrences" column. Then had the Top 5 Occurrences column pull "large()" from the Occurrences column, and had the Top 5 Fty column pull from the "helper + Occurrences" column.

  • Peelercm
    Peelercm
    edited 06/14/22
    Options
  • Brent Wilson
    Brent Wilson ✭✭✭✭✭
    edited 06/15/22
    Options

    Another way is to have a look at Genevieve P.'s solution with respect to Index Match

    Basically, it is having problems because both data have the same values how does it pick the winner?

    =JOIN(COLLECT(Fty$1:Fty$5, Occurrences$1:Occurrences$5, LARGE(Occurrences$1:Occurrences$5, 1)), " / ")

    =JOIN(COLLECT(Fty$1:Fty$5, Occurrences$1:Occurrences$5, LARGE(Occurrences$1:Occurrences$5, 2)), " / ")

    =JOIN(COLLECT(Fty$1:Fty$5, Occurrences$1:Occurrences$5, LARGE(Occurrences$1:Occurrences$5, 3)), " / ")

    =JOIN(COLLECT(Fty$1:Fty$5, Occurrences$1:Occurrences$5, LARGE(Occurrences$1:Occurrences$5, 4)), " / ")

    =JOIN(COLLECT(Fty$1:Fty$5, Occurrences$1:Occurrences$5, LARGE(Occurrences$1:Occurrences$5, 5)), " / ")

    This will show you "A2B001 / APU002" for 3 and 24P001 / AK4003 for 1

    If there are unique values they will be shown alone Ex.APU013

    Brent C. Wilson, P.Eng, PMP, Prince2

    Facilityy Professional Services Inc.

    http://www.facilityy.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!