Extra column that can filter table name from Appended multiple tables

alipezu

Board Regular
Joined
Oct 18, 2016
Messages
51
Hi All,
I have multiple tables Table A and Table B and I have appended those.
Now the problem is that Appended query doesn't have A column that shows me a table name??
So I would like to have a column (Table Name) that can show me a table name. so that I can filter it later.
Please help.
Thanks.

Table NameEmployee nameEmployee ID
Table ADavid10001
Table BRichard10022

<tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Power Query has a function for exact this situation: Table.FromPartitions.

Code for your situation:

Code:
= Table.FromPartitions("Table Name",{{"TableA", TableA},{"TableB",TableB}}, type text)

The first parameter is the name of your additional column.
The second parameter is a list of lists, each inner list is a pair consisting of the table name and the table itself.
The third argument is optional for the type of your new column (default any, in the code above: type text).
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,236
Members
448,555
Latest member
RobertJones1986

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