+ Reply to Thread
Results 1 to 14 of 14

Power Query append tables and sort columns

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Power Query append tables and sort columns

    Good evening,

    I hope you are well.

    I am attaching this file where I have a tab called ?Append1? which is the result of appending the three tables for Almeria on tab ?Goles?.

    Can you please help me so the cells in column ?Scoring? and ?Column1? move under ?Current sequences? and the numbers in column ?all? move to column total, please?

    Then, how if I want to use it for the other team "Athletic" I guess I just have to duplicate the new append table?




    Many thanks

    Sanchez
    Attached Files Attached Files

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

    Re: Power Query append tables and sort columns

    the cells in column ?Scoring? and ?Column1? move under ?Current sequences? and the numbers in column ?all? move to column total
    is that what you want?

    Home Away Total Current Sequences
    2 - - 1 goal scored or more
    2 2 4 1 goal conceded or more
    - 1 1 No goal scored
    - - - No goal conceded
    1 - - 2 goals scored or more
    1.50 0.50 1.00 GF per match
    1.50 1.00 1.25 GA per match
    3.00 1.50 2.25 GF + GA per match
    100% 100% 100% GF+GA over 0.5
    100% 50% 75% GF+GA over 1.5
    100% 0% 50% GF+GA over 2.5
    0% 0% 0% GF+GA over 3.5
    0% 0% 0% GF+GA over 4.5
    0% 0% 0% GF+GA over 5.5
    100% 50% 75% GF+GA over 0.5 at HT
    50% 50% 50% GF+GA over 1.5 at HT
    0% 0% 0% GF+GA over 2.5 at HT
    100% 50% 75% Scoring Rate
    100% 50% 75% Scoring Rate 1st-Half
    50% 0% 25% Scoring Rate 2nd-Half
    50% 0% 25% Scored in both halves
    100% 50% 75% Both teams scored
    100% 100% 100% Conceding Rate
    50% 50% 50% Conceding Rate 1st-Half
    50% 50% 50% Conceding Rate 2nd-Half
    0% 0% 0% Conceded in both halves

  3. #3
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Re: Power Query append tables and sort columns

    Hi Sandy,

    Yes, this is what Id like to be able to have. Just being fussy here, current sequence column being the one on the leftmost hand side.

    Can you please explain how you have done it?

    Thanks
    Sanchez

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

    Re: Power Query append tables and sort columns

    in Append query merge columns what you need then rename column to appropriate name
    Attached Files Attached Files
    Last edited by sandy666; 09-08-2022 at 05:21 PM.

  5. #5
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Re: Power Query append tables and sort columns

    Thanks Sandy.

    A few questions here:

    1. When appending the tables and trying to load the new appended table onto another sheet I get an error "This won?t work because it would move cells in a table on your worksheet.

    2. Is there any way that I could avoid appending the three other tables for the other team? Could I duplicate the new table append1 and change the source so it shows the data of the other team?

    3. My last question is will the data be refreshed into the appended table if I have changed the name of the table headings? I mean, the data source is a website that it is changing each time the teams play a game. I think that is why I am having the first question.

    Thanks
    Sanchez
    Attached Files Attached Files
    Last edited by viewotst; 09-08-2022 at 05:53 PM.

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

    Re: Power Query append tables and sort columns

    Append tables is very easy than more complicated changing source url because you haven't url in Append query but in basic tables

    see example
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Re: Power Query append tables and sort columns

    Sorry I have just edited my previous post.

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

    Re: Power Query append tables and sort columns

    you don't need load basic tables into the sheet, imho enough to load result tables

    the structure of the "original" source tables are always the same and data will be loaded there properly. after that you can change headers, structure, layout or whatever

    I suggest to read more here
    https://docs.microsoft.com/en-us/power-query/


    see example again
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Re: Power Query append tables and sort columns

    Hi Sandy,

    Thanks again for your time.


    Only issue is that I will be updating the data every week so does it mean I?d have to append the tables each time I am refreshing the data?


    Thanks
    Sanchez

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

    Re: Power Query append tables and sort columns

    If they don't change anything in structure it should work well

    anyway if something will be wrong you can always back to the forum and ask what's happen

  11. #11
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Re: Power Query append tables and sort columns

    Thank you Sandy,

    I have tried it this way and I am getting several errors. I am listing the steps taken and the file attached:

    1.I have the three tables for Almeria team and replaced the first column header of each one with the word ?option?

    2.I have appended them ?append queries as new?

    3.I got my ?Append1? table

    4.I have loaded the new table onto a new sheet and checked the box ?add to the data model?

    5.After doing the 4th step I got an error ?This won?t work because it would move cells in a table on your worksheet?. I do not understand this. When I clicked ok, the same error came up, then clicked ok and another one came up, and a last one came up when showing the ?Append1? table on the new sheet created.

    6.I get an error on my first query which says "Download failed".
    Attached Files Attached Files

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

    Re: Power Query append tables and sort columns

    1. load basic tables into the sheet is not necessary

    2. if you have to load these tables into the sheet don't put them vertically very close to each other, will be better put them horizontally.

    3. the "error" you see this is the warning about: your tables are too close and if there will be more data the tables can be overlapped

    4. load final version of the tables
    Attached Files Attached Files
    Last edited by sandy666; 09-09-2022 at 09:26 AM.

  13. #13
    Forum Contributor
    Join Date
    04-03-2021
    Location
    Zaragoza
    MS-Off Ver
    2102 MICROSOFT 365
    Posts
    153

    Re: Power Query append tables and sort columns

    Thank you, Sandy,

    Then, when the data changes on the website and I refresh the data on my queries, will they get updated as they have different headers name than the ones on the website? If so, will the appended table will automatically change?
    If not, will I have to manually change the headers so they queries have the same as the ones on the website? Current sequences, scoring and the third query header in blank?

    Attachment 795516

    Attachment 795517

    Attachment 795518

    Attachment 795519

    Attachment 795520

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

    Re: Power Query append tables and sort columns

    firstly: Invalid Attachment specified. If you followed a valid link, please notify the administrator

    data from the website is loaded into Source step from the link there
    all next steps with changes then append will show data from the web with your headers
    btw. did your read something about Power Query from the link in post#8 ? seems you didn't

+ 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 : append a new table
    By Ronyn in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2022, 09:42 AM
  2. [SOLVED] Power Query - Append and merge tables
    By DystopiaRelic in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2021, 02:42 PM
  3. [SOLVED] Data Append in power Query
    By hudson andrew in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-25-2021, 09:32 AM
  4. 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
  5. [SOLVED] Append Data using Power Query
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-24-2019, 10:26 AM
  6. Power query append?
    By pedroc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-08-2018, 06:08 PM
  7. Power Query - how to append tables
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 04:55 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