Combine tables

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,922
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have four identical columns and wish to combine them into a master table where:
I add a column to each table
Fill this column with the table name
Apend and repeat

Query is called Single_Table and so far I have:
Power Query:
(table_name)=>
let Source = Table.ReorderColumns(Table.AddColumn(table_name, "Book", each table_name),{"Book", "Ledger", "Operation Unit Code", "Operation Unit Name", "Country", "Amount (CAD)", "TPM", "Comment"})
in
    Source
But I can't get the table name to fill a blank column.

After this, I wish to create a table like:

source = Table.Apend(Single_Table("Sales"), Single_Table("Purchases"), Single_Table("Revenue_Earned"), Single_Table("Revenue_Expensed")

How can I use the table name as a value for a column add?

TIA,
Jack
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,713
Messages
6,174,038
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top