Results 1 to 1 of 1

Thread: PQ - How to append three or more tables with different headers (first table has proper headers)

  1. #1
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    238
    Rep Power
    7

    Cool PQ - How to append three or more tables with different headers (first table has proper headers)

    sheet 1 REGION Country Code UID EMP ID NAME USD Result
    data1 data2 data3 data4 data5 data6 REGION Country Code UID EMP ID NAME USD
    data1 data2 data3 data4 data5 data6
    sheet 2 REGION Country ID NAME LC AMOUNT data7 data8 data9 data10 data11 data12
    data7 data8 data9 data10 data11 data12 data13 data14 data15 data16 data17 data18
    sheet 3 REGION Country ID EMP LC AMOUNT
    data13 data14 data15 data16 data17 data18

    Code:
    let
        TFR2 = Table.FromRecords({[REGION = "REGION", Country = "Country Code", ID = "UID", NAME = "EMP ID", LC = "NAME", AMOUNT = "USD"]}),
        TFR3 = Table.FromRecords({[REGION = "REGION", Country = "Country Code", ID = "UID", EMP = "EMP ID", LC = "NAME", AMOUNT = "USD"]}),
        Source1 = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        Source2 = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
        Source3 = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        App2 = Table.Combine({TFR2, Source2}),
        App3 = Table.Combine({TFR3, Source3}),
        Prom2 = Table.PromoteHeaders(App2, [PromoteAllScalars=true]),
        Prom3 = Table.PromoteHeaders(App3, [PromoteAllScalars=true]),
        Append = Table.Combine({Source1, Prom2, Prom3})
    in
        Append


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=oVb1RfcSHLM&lc=UgwTq-jZlZLnLQ5VB8Z4AaABAg.9Hroz-OyWog9tYjSMc1qjA
    https://www.youtube.com/watch?v=0pbsf6sox34&lc=Ugxp9JFvvejnqA68W1t4AaABAg
    https://www.youtube.com/watch?v=kfQC-sQxMcw&lc=UgyCxQWypNIhG2nUn794AaABAg.9q1p6q7ah839t UQl_92mvg
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgyOh-eR43LvlIJLG5p4AaABAg.9isnKJoRfbL9itPC-4uckb
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugy1B1aQnHq2WbbucmR4AaABAg. 9isY3Ezhx4j9itQLuif26T
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgxxajSt03TX1wxh3IJ4AaABAg. 9irSL7x4Moh9itTRqL7dQh
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg. 9irLgSdeU3r9itU7zdnWHw
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgwJAAPbp8dhkW2X1Uh4AaABAg. 9iraombnLDb9itV80HDpXc
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgzIzQ6MQ5kTpuLbIuB4AaABAg. 9is0FSoF2Wi9itWKEvGSSq
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 09-22-2023 at 04:07 PM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

Similar Threads

  1. Replies: 1
    Last Post: 06-27-2014, 09:22 PM
  2. Dynamic creation of headers
    By GerrardSRakesh in forum Excel Help
    Replies: 0
    Last Post: 10-16-2013, 06:41 PM
  3. Replies: 9
    Last Post: 08-20-2013, 08:45 PM
  4. Replies: 25
    Last Post: 08-02-2013, 07:23 AM
  5. Replies: 9
    Last Post: 03-13-2012, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •