Column data = table name

jayped

Board Regular
Joined
Mar 20, 2019
Messages
54
Hi there,


I want to append three tables but I want to add a column to each table which differentiates them by using the table/ source name. I am new to Power Bi and when trying to research this I do not understand most of the solutions provided.

I have three files: Oct, Nov and Dec. I do not have a date column. I also want to avoid manually changing the month in the new column every month. How can I achieve this?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
this is example only
Code:
let
    Source = Excel.Workbook(File.Contents("D:\test\pbi\test.xlsx"), null, true),
    Filter = Table.SelectRows(Source, each ([Kind] = "Table")),
    ROC = Table.SelectColumns(Filter,{"Data", "Item"}),
    Expand = Table.ExpandTableColumn(ROC, "Data", {"item1", "item2", "item3"}, {"item1", "item2", "item3"}),
    Reorder = Table.ReorderColumns(Expand,{"Item", "item1", "item2", "item3"})
in
    Reorder
apndpbi.png
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,704
Members
449,048
Latest member
81jamesacct

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