+ Reply to Thread
Results 1 to 5 of 5

POWER QUERY - Merging 2 tables between workbooks

  1. #1
    Forum Contributor
    Join Date
    10-27-2019
    Location
    London
    MS-Off Ver
    365
    Posts
    179

    POWER QUERY - Merging 2 tables between workbooks

    Objective:

    Get data only from 1 column from Auxillary file into the Main file table.


    Challenges:

    The auxillary file is a software-generated xlsx from a database, which has more data than I need. Also comes as a range. Both files have a matching Product Number column. Based on that match, I want to get SKU data from Aux file into the Main file table. The SKU column does not currently exist in the main file. The Aux file will have more products than main table, but I am only interested in the ones listed in the main table.

    Is there a way to add only the SKU values directly to the main table? Instead of having a 3rd table from the merge?


    Also, a new file with recent information will be generated from time to time and saved into the same folder. Should I override existing file with the same name or save under a different name?

    And, if someone moved, renamed, deleted the aux file by accident, will my merged data in main file be affected?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: POWER QUERY - Merging 2 tables between workbooks

    Like this?
    Attached Files Attached Files
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  3. #3
    Forum Contributor
    Join Date
    10-27-2019
    Location
    London
    MS-Off Ver
    365
    Posts
    179
    Quote Originally Posted by tanasedn View Post
    Like this?
    Yes,but if possible as one table. I'll be doing some pivot tables from the dataset, and am worried I might run into problems long term if the column won't be part of the table.

    After the merge, I don't need the aux file either. Only as source for the query I suppose.

    Edit: to clarify. I am worried if data will get sorted in the table, it will mess up as the column next to the table may not get sorted appropriately. The sheet would be used by other people who may not know any different.
    Last edited by daithy; 01-12-2023 at 06:38 PM.

  4. #4
    Forum Contributor
    Join Date
    10-27-2019
    Location
    London
    MS-Off Ver
    365
    Posts
    179

    Re: POWER QUERY - Merging 2 tables between workbooks

    After doing a bit of research, I don't think it is possible for Power Query or Data Model to insert a column into an existing table. And I do admit that it most cases it would be just easiest to add merged data into new sheet.

    But because this will be shared by other people and they will be adding manually data to the table aside from that column because that information isn't available to them.

    I think the best solution will be 1) to use Power Query to Load to aux file into the main a a sheet. 2) Create a column in the main table and use a Lookup function.

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

    Cool Re: POWER QUERY - Merging 2 tables between workbooks

    maybe Power Pivot (this is idea only) but you'll need to know DAX if you want do something with it

    @Power Query
    if you want delete aux file, copy data from there into main then merge local aux and main and do what you want
    I don't understand why you do such strange manoeuvres instead of having all the data in one file
    if you don't want to show the local aux sheet then just do hidden or very hidden and that's it
    and everything will be much easier and faster to use and manage
    Attached Files Attached Files
    Last edited by sandy666; 01-12-2023 at 07:35 PM. Reason: typo

+ 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. [SOLVED] Add separator while merging columns if condition met in Power Query
    By JyothiGrace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2022, 09:15 AM
  2. [SOLVED] Power Query Wrong Merging (fuzzymerge with 1 result)
    By Imbizile in forum Excel General
    Replies: 11
    Last Post: 12-16-2020, 04:58 AM
  3. Power Query - Append 2 tables from different workbooks
    By elleb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2020, 05:17 PM
  4. [SOLVED] Power Query merging
    By Imbizile in forum Excel General
    Replies: 7
    Last Post: 05-09-2020, 08:59 AM
  5. 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
  6. Power Query Solution for merging data
    By kersplash in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2018, 12:40 AM
  7. Replies: 2
    Last Post: 03-06-2013, 06:43 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