+ Reply to Thread
Results 1 to 2 of 2

Denesting tables in XML data imported into Power Query

  1. #1
    Registered User
    Join Date
    08-10-2016
    Location
    California, USA
    MS-Off Ver
    Office 2016
    Posts
    2

    Denesting tables in XML data imported into Power Query

    Hi all, first time poster, so take it easy on me!

    I'm trying to extract specific columns from an XML relational database I imported into Excel (owing to my utter lack of Access knowledge and general ineptitude with databases). I'm getting a bunch of nested tables that I can't seem to resolve by unpivoting the columns in Query Editor/Power Query, even repeatedly. I just keep getting duplicate columns

    This is a screenshot of what I have. The first column is the drug ID, the second is either a nested table or a simple text, depending if the drug has multiple groups (approved, investigational, etc). One ID can have up to 6 groups.
    EXCEL_2016-08-10_15-18-04.png
    EXCEL_2016-08-10_15-21-13.png

    What I want is an output of each group associated with an ID on separate rows, like the following:
    ID Group Many other columns of data
    DB00003 Approved Many other columns of data
    DB00004 Approved Many other columns of data
    DB00004 Investigational Many other columns of data
    DB00005 Approved Many other columns of data
    DB00006 Special Snowflake Many other columns of data

    Is there a feature I'm missing, or another approach I can take? I'm pretty stumped at this point, so any suggestions are appreciated!

    EDIT: I've also attached excerpts from the original XML file and workbook. The original has 100k+ rows.
    sample.xlsx
    sample (2).zip
    Last edited by Cuine100; 08-12-2016 at 12:03 AM.

  2. #2
    Registered User
    Join Date
    08-10-2016
    Location
    California, USA
    MS-Off Ver
    Office 2016
    Posts
    2

    Re: Denesting tables in XML data imported into Power Query

    Bumping to top. Please help!

+ 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. Adding data to the end of a table with Power Query
    By afila in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2016, 08:29 AM
  2. Power Query - Get external data from Folder
    By crainaud in forum Excel General
    Replies: 0
    Last Post: 03-24-2016, 12:49 PM
  3. Power Query Import Binary Data Type
    By brent_milne in forum Excel General
    Replies: 0
    Last Post: 08-13-2015, 09:46 AM
  4. Power Query - how to append tables
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 04:55 AM
  5. Replies: 2
    Last Post: 03-06-2013, 06:43 AM
  6. Replies: 0
    Last Post: 02-04-2013, 06:59 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