Let's say I have some data that looks like this:
PLAYER |Team |Points
Smith |Suns |25
Jones |Suns |15
Martin |Suns |23
Chen |Suns |3
Williams |Suns |17
Quill |Marvel |40
Banner |Marvel |1
Stark |Marvel |1
Odinson |Marvel |1
Parker |Marvel |3
Curly |Spurs |2
Franke |Spurs |5
Wayne |Spurs |23
Weasley |Wizards |21
Potter |Wizards |19
Granger |Wizards |15
Thompson |Bobcats |12
Boehme |Bobcats |13
If I wanted to write a formula to sum the top 3 scores from each team, how would I do that?
For example, it would return this data:
Team |Points
Suns |65
Marvel |44
Spurs |30
Wizards|55
Bobcats|25
I've considered using a filter to say "if the value is greater than the middle value of the members of the team" or something, but if there were less than 3 members that wouldn't work.
I've also considered sumif
but I don't think that would be appropriate for the same reason.
I'm also looking to find the sum of the MIDDLE 3 scores, as well, but I'm sure if I get advice on finding the top 3, I can figure out how to adapt it for the middle 3.
Is this something that Power Query could be helpful with? I've dabbled, but I'm not a pro. (If I absolutely had to, I could also probably whip up something in VBA, but I'd rather not go down that route if possible, since I want to put it in a Google Sheet to share it on the web eventually).