+ Reply to Thread
Results 1 to 8 of 8

Data to the right of my query won't stay with the corresponding data

  1. #1
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Data to the right of my query won't stay with the corresponding data

    I have a data set that I am importing to Excel using an ODBC connection. I have information to the right of the created table that adds detail to that corresponding record. However, when I refresh, Excel doesn't keep my details with that corresponding record. Is there any way to bypass this, and still allow refreshes to load more records to my data set?

  2. #2
    Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    130

    Re: Data to the right of my query won't stay with the corresponding data

    I think this is only possible either with VBA or PowerQuery.

    you need another table (shadow table) which has the same data as your import table but including your additional columns.
    Each import must trigger a refresh which adds only new imported data to your shadow table.

  3. #3
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Data to the right of my query won't stay with the corresponding data

    Hi Gue2013, thank you for that.

    I'm not too familiar with the concept of a shadow table. Is it a direct reference (=) to the original table?

  4. #4
    Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    130

    Re: Data to the right of my query won't stay with the corresponding data

    It is not a reference, it is a copy.
    in VBA:
    the first time: copy the data to another sheet or area and add here your details to each record (final table). This is the table you want to work with.
    following imports: compare the imported data with your "final table" and update each record (row) and add new data at the end of the table.

    in PowerQuery (less effort compared to VBA):
    there are a few infos on the WEB. I always use https://exceleratorbi.com.au/self-re...s-power-query/

    If you still use MS-office 2013 then you have to install it. In later versions PQ is already included.

  5. #5
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Data to the right of my query won't stay with the corresponding data

    Gue, this is amazing. Thank you so much for these resources. I have not had the chance to work with Power Queries prior to this, and spent the majority of the week trying to figure it out. The solution it seems just to work just fine, as the blog says, until you get to duplicate data. I don't have duplicate values in my source data, but since my data is connected to our work order system, every time I refresh, the Power Query is appending another full record set of work orders to my existing list.

  6. #6
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Data to the right of my query won't stay with the corresponding data

    I'm going to continue researching until I get it--thanks again for all the help!

  7. #7
    Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    130

    Re: Data to the right of my query won't stay with the corresponding data

    Happy that I could help you

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2019 (Win 10 - Work) & 365 Subscription Insider (Win 10 - Home)
    Posts
    35,393

    Re: Data to the right of my query won't stay with the corresponding data

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

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