+ Reply to Thread
Results 1 to 5 of 5

Power Query: Appending Tables

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Power Query: Appending Tables

    Hi,

    In the attached workbook I have created 6 sheets with sample data arranged as a named Excel Tables.

    I have used Power Query to consolidate the 6 tables, using a query called AllData, into a sheet called "Report".

    When I refresh the query, without adding new data to the source tables, the table in the "Report" sheet expands to contain more fields.

    I thought that this might be because the AllData table has been included in the query when refreshed but that doesn't seem to be the case when I look at the "Source" line in the Applied Steps.

    Can someone please suggest what I've done wrong?

    Thanks!
    Attached Files Attached Files
    Last edited by andrewc; 08-26-2021 at 09:48 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: Power Query: Appending Tables

    At the Source step, deselect AllData in the table list.

    Please Login or Register  to view this content.
    AliGW on MS365 Insider (Windows) 32 bit
    A
    B
    C
    D
    E
    1
    PRODUCT NAME.1 SALES DATE Name
    2
    AAA Apples
    100
    31/01/2021
    Data_Jan
    3
    BBB Bananas
    200
    31/01/2021
    Data_Jan
    4
    CCC Carrots
    300
    31/01/2021
    Data_Jan
    5
    AAA Apples
    105
    28/02/2021
    Data_Feb
    6
    BBB Bananas
    205
    28/02/2021
    Data_Feb
    7
    CCC Carrots
    305
    28/02/2021
    Data_Feb
    8
    DDD Dates
    100
    28/02/2021
    Data_Feb
    9
    AAA Apples
    110
    31/03/2021
    Data_Mar
    10
    BBB Bananas
    210
    31/03/2021
    Data_Mar
    11
    DDD Dates
    105
    31/03/2021
    Data_Mar
    12
    AAA Apples
    120
    30/04/2021
    Data_Apr
    13
    BBB Bananas
    220
    30/04/2021
    Data_Apr
    14
    CCC Carrots
    320
    30/04/2021
    Data_Apr
    15
    DDD Dates
    110
    30/04/2021
    Data_Apr
    16
    AAA Apples
    125
    31/05/2021
    Data_May
    17
    BBB Bananas
    225
    31/05/2021
    Data_May
    18
    CCC Carrots
    325
    31/05/2021
    Data_May
    19
    EEE Eggs
    100
    31/05/2021
    Data_May
    20
    AAA Apples
    130
    30/06/2021
    Data_Jun
    21
    CCC Carrots
    330
    30/06/2021
    Data_Jun
    22
    CCC Carrots
    300
    30/06/2021
    Data_Jun
    23
    EEE Eggs
    105
    30/06/2021
    Data_Jun
    24
    DDD Dates
    115
    30/06/2021
    Data_Jun
    Sheet: Report
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Power Query: Appending Tables

    edit: should have refreshed before posting...

    yes, you're including All Data, so first run it's empty, second run it isn't (the Name is empty as you have no Name field in AllData)

    Additional line in red to filter out the AllData table from the collation process.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Re: Power Query: Appending Tables

    Thank you both very much!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: Power Query: Appending Tables

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

    You can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Combine tables in Power Query
    By Ebl in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 08-02-2021, 08:11 AM
  2. [SOLVED] Probelms with appending data with power query
    By sakhtar100 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-10-2020, 12:42 PM
  3. Power Query: Appending empty data set
    By Phil123456789 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2020, 05:29 PM
  4. 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
  5. Appending Charts using Power Query Excel 2016
    By STokhi1 in forum Excel Charting & Pivots
    Replies: 13
    Last Post: 07-02-2018, 07:30 AM
  6. Power Query tables in VBA
    By orhanceliloglu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2018, 08:25 AM
  7. Appending Power Query in VBA
    By randallrosa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2017, 03:48 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