+ Reply to Thread
Results 1 to 6 of 6

Trying to make a pivot table that combines 4 columns of data into one field.

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    canada
    MS-Off Ver
    2013
    Posts
    3

    Trying to make a pivot table that combines 4 columns of data into one field.

    I'm trying to turn a table representing inventory by location into a pivot-table that lists the information by shelf number (and breaks that down by product).

    The data is currently laid out as:
    Product - Loc1 - Qty1 - Reserved Qty1 - Loc2 - Qty2 - Res2 - ...
    ...with up to 4 locations for each product.

    I can't figure out how to make a pivot table that can combine the information from the 4 location fields into one. I have succeeded using only one (of four possible) location's worth of data per product, as attached ( Attachment 330501 ).

    Any help would be appreciated!

    Alternatively, I have broken the data down into 4 identically laid out tables (Product-Loc-Qty-Res). I couldn't find a way to combine them while leaving the location and product fields separate ("consolidating" them combined product and location both into the same field), but if there is a solution using separated data then that works too!
    Last edited by bsmith8529; 07-08-2014 at 08:04 AM. Reason: added detail

  2. #2
    Registered User
    Join Date
    02-21-2014
    Location
    Connecticut, U.S.A.
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Trying to make a pivot table that combines 4 columns of data into one field.

    I'm not able to read the attachment at work but my guess is that your requirement is pretty simple.

    You need to stack the fields in your row labels but you also need to have some kind of value to put in the Values section. Without a defined value, the pivot table won't go. Can you do a count of products?

  3. #3
    Registered User
    Join Date
    07-07-2014
    Location
    canada
    MS-Off Ver
    2013
    Posts
    3

    Re: Trying to make a pivot table that combines 4 columns of data into one field.

    The problem with stacking (assuming you mean just having 4 rows per product with a different location in each) is that all my data is drawn from a (terribly laid out) constantly changing worksheet that I cannot change the formatting of, and I need a sustainable solution that shouldn't involve manually stacking the data each time I want a current pivot table. I've solved my own problem for now by creating a macro that temporarily creates 4 versions of every product, (each representing a different location,) creates a pivot table from that, and then deletes the stacked data. This works for now, but it seems overly complicated for what is presumably a pretty common issue....

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Trying to make a pivot table that combines 4 columns of data into one field.

    I think the easiest way to do it would be, to just create a big Pivot Table that takes:
    Locations as the Row Labels,
    Product as the Column Labels,
    Quantity + Reserved Quantity as the Values,

    And then turn Grand Totals on for rows, so it will create a column at the right that's the summation for all the locations.

    Well, I'm getting the "invalid attachment specified" error, so I can't test this hypothesis on your data.

  5. #5
    Registered User
    Join Date
    07-07-2014
    Location
    canada
    MS-Off Ver
    2013
    Posts
    3

    Re: Trying to make a pivot table that combines 4 columns of data into one field.

    Yeah it definitely would, but it doesn't address my biggest problem. My fields are Product, Location1, Quantity1, Reserved1, Location2, Quantity2, Reserved2, Location3, Quantity3, Reserved3, Location4, Quantity4, Reserved4.

    If I choose Location1, Location2, Location3, Location4 as row labels, it nests them all instead of just combining them. I need some way of taking those 4 fields and creating one master Location field, while maintaining the individual Quantity and Reserved values for each.

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Trying to make a pivot table that combines 4 columns of data into one field.

    Hi,

    I guess this can be done by changing the Pivot Table Layout to "Classic View". Please post a sample template of your workbook using "Go Advanced" option.

+ 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. Calculated pivot table field using pivot table data in calculation
    By BrittleStar in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-10-2012, 05:35 PM
  2. Pivot Table: multiple columns into 1 field
    By john2525 in forum Excel General
    Replies: 1
    Last Post: 02-23-2012, 08:10 PM
  3. Pivot Table VBA - Data Field - Original (source) field name
    By hbgpausa0 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2008, 10:25 AM
  4. [SOLVED] show sereral columns of data field in pivot table
    By Linda in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 02-17-2006, 10:50 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