+ Reply to Thread
Results 1 to 10 of 10

Combine tables in Power Query

  1. #1
    Registered User
    Join Date
    06-08-2018
    Location
    Dk
    MS-Off Ver
    365
    Posts
    6

    Combine tables in Power Query

    The title is not very accurate, but I'm looking for help to merge (or append) two (or more) tables from Power Query.
    In the attached example, I have a range of from and to inputs of various information (in this case, for a railway example project rail- and superstructure types).
    I have imported both tables into Power Query, and tried to both combine and append them, but the results are not exactly what I'm looking form

    I've added a tab called "Goal" to show what I'm trying to accomplish.
    I will need to add additional information in the same type of formatting at a later stage, so anything that automates this process is greatly appreciated!

    Hopefully someone will be able to help.


    Best Regards,
    Attached Files Attached Files
    Last edited by Ebl; 08-02-2021 at 08:12 AM. Reason: Solved

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Combine tables in Power Query

    Hi, I think the below would do what you want, i.e. mimics your "Goal" but, I've no doubt the more savvy PQ folk could do this much more efficiently ...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-08-2018
    Location
    Dk
    MS-Off Ver
    365
    Posts
    6

    Re: Combine tables in Power Query

    Yes, this works - Thank you!
    What if I wanted to add another or more data with the same formatting?

  4. #4
    Registered User
    Join Date
    06-08-2018
    Location
    Dk
    MS-Off Ver
    365
    Posts
    6

    Re: Combine tables in Power Query

    I see that I made a mistake in the "Goal" tab, by having cell A8 = 0, and not a reference back.
    How do I get rid of this in the script?
    Last edited by AliGW; 08-02-2021 at 04:09 AM. Reason: PLEASE don't quote unnecessarily!

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Combine tables in Power Query

    change

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Last edited by AliGW; 08-02-2021 at 04:09 AM. Reason: Code tags added.

  6. #6
    Registered User
    Join Date
    06-08-2018
    Location
    Dk
    MS-Off Ver
    365
    Posts
    6

    Re: Combine tables in Power Query

    Thanks a lot. This was extremely useful!
    Is there an "easy" way to add additional information, like another table with the same formatting?

  7. #7
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Combine tables in Power Query

    Power Query is capable of lots of things however, to advise further you would need to provide a further sample (including both source, and desired output - as before).

  8. #8
    Registered User
    Join Date
    06-08-2018
    Location
    Dk
    MS-Off Ver
    365
    Posts
    6

    Re: Combine tables in Power Query

    Yes of course.
    Please find attached an updated spreadsheet with two additional sheets with their own respective tables.
    The "Goals" tab was updated as well, with these two new tables.
    Attached Files Attached Files

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Combine tables in Power Query

    Rename Alignment

    Please Login or Register  to view this content.
    and Result

    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-08-2018
    Location
    Dk
    MS-Off Ver
    365
    Posts
    6

    Re: Combine tables in Power Query

    This is incredible!
    Thank you all very much for your help.
    Power Queries are such a powerful tool if mastered correctly.

+ 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. Power Query - Combine Merges
    By ptmuldoon in forum Excel General
    Replies: 1
    Last Post: 12-19-2020, 06:45 PM
  2. [SOLVED] Power Query Combine
    By kabseeker in forum Excel General
    Replies: 2
    Last Post: 05-05-2020, 10:12 AM
  3. Power Query: Updating a query based on changing tables
    By cheesehead101 in forum Excel General
    Replies: 1
    Last Post: 12-16-2019, 06:54 PM
  4. [SOLVED] Power Query: Combine records with deliminter
    By misty15 in forum Office 365
    Replies: 4
    Last Post: 09-17-2019, 04:34 PM
  5. Power Query: Combine and Transform from folder
    By LUKE92 in forum Excel General
    Replies: 13
    Last Post: 06-26-2019, 12:34 AM
  6. [SOLVED] I do not have a combine option - Power Query
    By callumlmcgrath in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-08-2019, 06:24 AM
  7. Power Query: combine sheets from different workbook
    By erica.ho56458 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2018, 02:28 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