+ Reply to Thread
Results 1 to 6 of 6

Top 10 customer per category

  1. #1
    Registered User
    Join Date
    11-13-2020
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    12

    Top 10 customer per category

    Hi. I have a call log data for customer calls according to categories for January.
    I need to make a report of top 10 customers per category. I just can't get my head around how to do it. Can someone please help?
    I have attached sample data. Column A shows category call relates to and column B shows the name of the customer who called. I am trying to make a pivot table.
    Attached Files Attached Files

  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 2406
    Posts
    44,419

    Re: Top 10 customer per category

    Next time, please post a file that meets the forum guidleines: 10-20 rows and expected results, calculated manually... not 1900 rows and no expected results at all. As your sample is massive, I have done little or no manual checking.

    To return the categories (and assuming that you still do not have O365):

    =IFERROR(INDEX($A$2:$A$1921,MATCH(1,INDEX(--ISNA(MATCH($A$2:$A$1921,E$1:E1,)),),)),"")

    copied down. To return the names, this formula will return the first 10... in frequency order... providing that they occur more than once.

    =IFERROR(INDEX($B$2:$B$1921,MODE(IF(COUNTIF($E2:E2,$B$2:$B$1921)=0,IF($A$2:$A$1921=$E2,MATCH($B$2:$B$1921,$B$2:$B$1921,0))))),"")

    It is an array formula in your stated version of Excel. These 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 the curly brackets { } 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...

    IF you want the top 10 to include names that occur ONLY once, the formula in the second block will do that... returning values with n=1 in order of appearance.
    Attached Files Attached Files
    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

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

    Re: Top 10 customer per category

    You can choose top 10 as an option in the pivot table,(value filter on count of customer name) . however it will return ties so you will end up with more than 10 customers in this instance
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-13-2020
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    12

    Re: Top 10 customer per category

    Hi. I have attached a sample with intended results. I need to know top 10 customers for each category (preferably using a pivot table).
    Please let me know if I need ti provide anything further?
    Attached Files Attached Files

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

    Re: Top 10 customer per category

    Do you have Microsoft O365?

    You will struggle (without VBA) to get the exact layout you want, especially in a Pivot Table. Did you even look at the layout in the second datablock in my post??
    Attached Files Attached Files

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 10 customer per category

    You could use Power Query. Format your source data as a table, then use:

    Please Login or Register  to view this content.
    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...

+ 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. Generate a separate staff customer list based on larger customer table
    By CARROLLJP in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2018, 04:40 PM
  2. [SOLVED] Formula that can check for two criteria per customer when multiple customer lines exist
    By Macey351 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2016, 10:11 AM
  3. Replies: 4
    Last Post: 11-28-2014, 07:53 AM
  4. Replies: 0
    Last Post: 10-25-2012, 09:52 AM
  5. [SOLVED] Productsum: Highest Frequency Category, Specific Main Category, Frequency of Category
    By T86157 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2012, 12:43 PM
  6. Replies: 1
    Last Post: 07-07-2006, 02:10 PM
  7. Replies: 0
    Last Post: 08-28-2005, 11:07 AM

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