Forum Discussion
croufspesi
6 years agoFrequent Visitor
Add column to data set using append
I have a pbix set to append files from within a folder. Folder currently contains 3 files 2018 Revenue 2019 Revenue 2020 Revenue I have added 2 additional columns to the end of the data set...
amitchandak
6 years agoSuper User
croufspesi , Open your data in data transformation and right-click on the table name and open advance editor
You will see the script
let
Source = Excel.Workbook(File.Contents("..\salesAfter regdate.xlsx"), null, true),
sales_Sheet = Source{[Item="sales",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(sales_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Sales_Rep", type text}, {"Sales_Date", type date}, {"Units", Int64.Type}})
in
#"Changed Type"
Add columns and datatype to check