+ Reply to Thread
Results 1 to 6 of 6

Power Query: Group by category, list text items on separate rows

  1. #1
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Power Query: Group by category, list text items on separate rows

    I'm new to Power Query but I've been able to get close to what I need up until the Extracted Values part where I'd like the result to look similar to a Pivot Table where I have groupings of items with each of the items on a separate row under a single grouped header row.

    In Power Query I've only been able to group all the items in a separate column next to the group heading but with all the items within that group stacked upon one another in the same cell or with the individual items delimited (with commas, or other delimiter) on the same row as the grouped category.

    You can see in the images the two variations on what I've ended up with I'm hoping to have something like what is shown in the example worksheet attached with the grouped items on separate rows. I'd use a Pivot table but the grouped items are text so I needed to move to Power Query.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query: Group by category, list text items on separate rows

    but this is very fast and easy with PivotTable. Why you want make your life harder?
    Attached Files Attached Files
    Last edited by sandy666; 08-04-2017 at 02:47 PM. Reason: file added

  3. #3
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Power Query: Group by category, list text items on separate rows

    I agree, I can Pivot table well enough, and I do appreciate your example resolution, but I left out the part that forced me to power query and I wasn't clear about that (apologies...).

    In my haste I left out that there was a second text field which I forgot to mention above and I also left out of the example, and it's this filed that caused me to move to power query. I got as far as your example with Pivot tables but the Unit field is also text and I was unable to get it to show up beside the items since it seems that everything else in a PT needed to be numbers.

    I also got the PT to allow me to select from multiple Stores, which I didn't add to the example and that too was worked out in the PT but that pesky second text field was a game stopper for me with pivot tables.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query: Group by category, list text items on separate rows

    you mean you want to show UNIT column (with lb) ?
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Power Query: Group by category, list text items on separate rows

    Yes...you got me, I don't know why I wasn't able to figure that out. I appreciate your quick support.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query: Group by category, list text items on separate rows

    You are welcome and thanks for the feedback and mark thread solved

+ 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: 11
    Last Post: 08-01-2017, 06:08 AM
  2. Remove Unique rows in Power Query
    By danielmorrison in forum Excel General
    Replies: 2
    Last Post: 03-11-2016, 09:06 AM
  3. Exporting Facebook group comments to Excel using Power Query?
    By trapperjohn22 in forum Excel General
    Replies: 2
    Last Post: 02-27-2016, 04:12 AM
  4. Replies: 2
    Last Post: 07-19-2015, 06:04 PM
  5. Copy column data by group/category, where the number of rows change
    By davidmurphy25 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2012, 10:25 PM
  6. Replies: 1
    Last Post: 09-03-2012, 10:03 PM
  7. Separate data list into 3, depending on the category in column 2
    By dr.rohit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-23-2012, 05:36 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