Merge two sheets into one w/o query

okay, thanks. how does the append function automatically re-use the column heading from each table?

have great evening!!
 
Table 1 M Code:

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Field name", type text}, {"Description", type text}, {"From position", Int64.Type}, {"To position", Int64.Type}, {"Length", Int64.Type}, {"Field type A=Alphanumeric, N=Numeric", type text}, {"Mandatory", type any}, {"Type", type text}, {"SEARCH", Int64.Type}})
in
    #"Changed Type"

Table 2 M Code:


Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Field name", type text}, {"Description", type text}, {"From position", Int64.Type}, {"To position", Int64.Type}, {"Length", Int64.Type}, {"Field type A=Alphanumeric, N=Numeric", type text}, {"Mandatory", type any}, {"Type", type text}, {"SEARCH", type any}}),
    #"Appended Query" = Table.Combine({#"Changed Type", Table1})
in
    #"Appended Query"
 
how does the append function automatically re-use the column heading from each table?

The two columns have the same column headers, so that's how it matches the columns. It only needs the headers once and uses those from Table 1.
 
I have defined the sheets InputFields and OutPutFields as tables but they don't show up under here when I select Append.. I need the formulas in my tables..
 

Attachments

  • 1.xlsx
    31.2 KB · Views: 7
Well, there are no queries in the workbook, so how are you expecting them to be appended?

If you need a walkthrough of this, I am happy to help, but I am at work at the moment, so it would have to be later this evening.
 

Attachments

  • PQ Append AliGW.xlsx
    38.6 KB · Views: 9
I thought that if I defined my sheets as tables they would appear so I can run queries on them..
 
Nope. You have to set up connection only queries, but it's very easy, and once done, does not have to be done again. There are other ways, but all involve getting the tables into a query.

Can't talk you through it at the mo - still at work. But there are loads of online tutorials if you are keen to get on with it. It's all really easy once you know what you're doing.
 
ok, got it. please send links so I can learn! so thankful.. i tried to do it but lost all my formulas when doing it :)
 
You won't lose formulae from the source tables, but formulae do not carry across into the results query (but then, they shouldn't need to).

I'll find some links and post them later.
 
- Follow this link for an introduction to Power Query functionality.

It might be worth getting your hands on M is for Data Monkey, co-authored by Ken Puls (owner of this site).
 
Back
Top