+ Reply to Thread
Results 1 to 9 of 9

Main contributor

Hybrid View

  1. #1
    Registered User
    Join Date
    01-06-2024
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    5

    Main contributor

    Hello!

    I have a table consisting of three columns: Department, Product and Profit. The profit is summed up per Department.

    My end goal is an analysis of the table as shown in the text to the right.

    How would you tackle such a problem?

    The sum per department is known, but how do I find the main contributing product (for that department's total profit?)
    Attached Files Attached Files
    Last edited by PerdiditInMari; 01-07-2024 at 05:52 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: Main contributor

    A Pivot Table does the trick, but I do not understand why AB is the largest contributor as -15 is smaller than 10 ( contributor AE)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-06-2024
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    5

    Re: Main contributor

    The title contributor could perhaps be misleading. A better way of putting it would be:
    The profit of department C is negative 20 and the main reason is product AB with a negative profit of 15.

  4. #4
    Registered User
    Join Date
    01-06-2024
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    5

    Re: Main contributor

    How would you configure such a pivot table? Could you point out how to start?

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,415

    Re: Main contributor

    I'm guessing it's because it is the major contributor to a negative total. That is, -15 is the biggest contributor to -20. The +10 and -10 balance out.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Registered User
    Join Date
    01-06-2024
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    5
    Could someone please help me get started?

    The table isn't static, both the number of departments and products could vary.

    Formulas, a pivot table, VBA?

  7. #7
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Main contributor

    Is it what you are looking for?

    Excel 365 (Windows) 64 bit
    L
    M
    N
    11
    Department Total Profit Main Contibutor
    12
    A
    20
    15
    13
    B
    25
    15
    14
    C
    -20
    -15
    Sheet: Sheet1


    Formula: copy to clipboard
    =XLOOKUP(L12&AGGREGATE(14,6,ABS(Table1[Profit])*(Table1[Department]=L12),1),Table1[Department]&ABS(Table1[Profit]),Table1[Profit])
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-06-2024
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    5

    Re: Main contributor

    It works like a charm.

    My sincerest thanks.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,895

    Re: Main contributor

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Replies: 3
    Last Post: 03-17-2023, 09:07 PM
  2. 1234 Main ST to 12XX Main St
    By michiebee in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-14-2016, 06:14 AM
  3. Why not be Valued Forum Contributor ?
    By Fotis1991 in forum The Water Cooler
    Replies: 31
    Last Post: 12-03-2012, 09:22 AM
  4. Working towards valued forum contributor
    By WorldBridge in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-10-2012, 12:43 PM
  5. Why is Tigeravatar "A valued forum contributor"
    By JapanDave in forum The Water Cooler
    Replies: 78
    Last Post: 09-07-2012, 07:01 AM
  6. Individual Contributor Tabs from a Master Spreadsheet
    By reneeh63 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-10-2010, 11:41 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