+ Reply to Thread
Results 1 to 6 of 6

Group Data on Columns in Pivot Table

  1. #1
    Registered User
    Join Date
    05-13-2015
    Location
    Charleston, South Carolina
    MS-Off Ver
    Excel 2013
    Posts
    3

    Group Data on Columns in Pivot Table

    I have a table that looks like this:

    Job Agent1 Comm1 Agent2 Comm2
    1 Bob $100 Dave $300
    2 Dave $200 Joe $200
    3 Joe $200 Bob $100
    4 Dave $200 Joe $500
    5 Bob $500 NA NA


    I would like to summarize it with a pivot table as such:

    Agent Total Comm
    Bob $700
    Dave $700
    Joe $900

    Is this possible? Thanks for the help!

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Group Data on Columns in Pivot Table

    You'd need to flatten the table first. Something like below.
    0.JPG

    This is easy to do if you have access to PowerQuery/Get&Transform.

    If not, you can use Pivot Table Wizard to flatten table.

    Watch video in link.
    https://www.launchexcel.com/pivot-ta...tten-crosstab/
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    05-13-2015
    Location
    Charleston, South Carolina
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Group Data on Columns in Pivot Table

    Thanks for the response! The original data cannot be manipulated as it is pulling directly from a database. If I do it this way it looks like it creates a new table that is not connected to the original data. Therefore if the original data is changed it won't update the flattened summary table.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Group Data on Columns in Pivot Table

    If you are querying from DB. Can you not write native SQL query with Unpivot operator to flatten table?

  5. #5
    Registered User
    Join Date
    05-13-2015
    Location
    Charleston, South Carolina
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Group Data on Columns in Pivot Table

    The only thing I am pulling from the database is the Job and Agent 1. The rest is entered into the spreadsheet in the format I posted originally. We are doing this as the sales system is limited in its ability to track any commissions. Therefore I created this tool so that they can, however I would like to summarize the data for them.

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Group Data on Columns in Pivot Table

    Hmm, you could do it with formula. But I wouldn't recommend that route, as it can slow down performance.

    Another option to do it using VBA, if you are open to it.

    Other than that, PowerQuery/Get&Transform is your best option (or generate report using some other tool, Ex: PowerBI Pro etc).

+ 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. Group in a Pivot table but keep several text data columns as columns..
    By NunesJunior in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 06-22-2017, 04:45 PM
  2. Group data in pivot table by date
    By leobueno in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 04-16-2016, 12:29 PM
  3. Quick macro to group (and name) data in pivot table
    By Faintkitara in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2015, 08:35 PM
  4. [SOLVED] Can't group Data in Pivot Table
    By Fletch74 in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 03-23-2014, 06:26 PM
  5. how to create group in pivot table data
    By ganeshadeshpande in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2013, 04:33 AM
  6. [SOLVED] Why does the pivot table not allow me to group data?
    By Forrest in forum Excel General
    Replies: 6
    Last Post: 01-12-2006, 09:15 PM
  7. Replies: 4
    Last Post: 03-17-2005, 06:06 PM

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