+ Reply to Thread
Results 1 to 5 of 5

Help combining the Average If/Percentile Function

  1. #1
    Registered User
    Join Date
    08-07-2017
    Location
    Philadelphia
    MS-Off Ver
    Microsoft 365
    Posts
    20

    Help combining the Average If/Percentile Function

    example sheet attached


    hi, I have a list of basketball player games and I want to analyze the points column (column J) and find out what each players ceiling is(the point amount that happens 15% of the time) so would that technically be the 85th percentile?


    and then once I find the point amount (their ceiling) I want to find out the players average points when he scores exclusively over the 85th percentile


    So as an example 2 players

    They both may score 35 or more points 15% of the time, but 1 player averages 50 points when he scores strictly over 35 and the other player averages 40 when he scores strictly over 35

    hope I was clear and will respond quickly if need clarification
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Help combining the Average If/Percentile Function

    Here is my shot at it.

    First we need to calculate the 85th percentile for a player. This is done by what used to be an array formula: =PERCENTILE(IF([Player]=[@Player],[PTS],FALSE),0.85). The IF statement says only consider rows that match the player name. You wind up with the same number for each row that has that player's name. This is the player's 85th percentile.

    Then I compare the score with the percentile to get a True / False. Then use AVERAGEIFS.
    Attached Files Attached Files
    Last edited by dflak; 01-29-2022 at 06:27 PM.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    08-07-2017
    Location
    Philadelphia
    MS-Off Ver
    Microsoft 365
    Posts
    20

    Re: Help combining the Average If/Percentile Function

    Quote Originally Posted by dflak View Post
    Here is my shot at it.

    First we need to calculate the 85th percentile for a player. This is done by what used to be an array formula: =PERCENTILE(IF([Player]=[@Player],[PTS],FALSE),0.85). The IF statement says only consider rows that match the player name. You wind up with the same number for each row that has that player's name. This is the player's 85th percentile.

    Then I compare the score with the percentile to get a True / False. Then use AVERAGEIFS.
    hi this definitely seems to be what i was trying to figure out! Thank you so much

    I do have a question..in the formulas you created, I see Player and Pts mentioned a few times is that describing the Player and Pts column?

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Help combining the Average If/Percentile Function

    Oh yeah, I forgot to mention: I converted your data range into an Excel Table. Excel Tables have too many advantages not to use them: they "know" how big they are so if you add or subtract data, formulas, pivot tables and charts will adjust automatically along with them. They also "remember" formulas and copy them down automatically even if you delete the data and copy and paste in new data.

    As you also noted, formulas can be expressed in terms of the column headers which makes them easier to understand. [Column Name] means the whole column and [@Column Name] or [@[Column Name]] (both work) means the value on that row.

    Intelisense helps you fill these names in. So if you type "[" you'll get a list of the column headers in the table. If you select the cell on the same row, you'll get the @ version automatically.

    To reference the columns from outside the table, use TableName[ColumnName].

    This nomenclature also carries over into VB code.

    To create a table from a range, right click any cell in the range and follow the prompts. You may be asked if the table has headers and you will be asked to select the style (color) table you want. Excel does a good job guessing the "borders" of the table. If it doesn't you can change the range manually.

    The table name is assigned automatically as Table1, Table2, ... You can change this name. I generally keep the Table_ prefix and give it a descriptive name like Table_Data or Table_Inventory.

  5. #5
    Registered User
    Join Date
    08-07-2017
    Location
    Philadelphia
    MS-Off Ver
    Microsoft 365
    Posts
    20

    Re: Help combining the Average If/Percentile Function

    thank you for explaining your process! I really appreciate it

+ 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. Percentile formula average price and quantity
    By mccskey in forum Excel General
    Replies: 6
    Last Post: 02-19-2021, 08:15 PM
  2. [SOLVED] Combining Percentile, IF functions with Positive and Negative values
    By VenatusNocte in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-29-2018, 05:00 PM
  3. Average if with percentile function
    By TeemuR in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-21-2015, 06:11 AM
  4. Average Top 50 Percentile Values in an Array
    By JonnyBoy333 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-17-2014, 12:38 PM
  5. [SOLVED] Conditional percentile: Bug in percentíle function?
    By Duronka in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2013, 08:08 AM
  6. Combining Average excluding 0 with ISERROR function
    By olga6542 in forum Excel General
    Replies: 18
    Last Post: 06-17-2010, 06:11 PM
  7. Combining Average excluding 0 with ISERROR function
    By olga6542 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2010, 11:30 AM

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