Forum Discussion
Combine Files but leave columns
- 6 years ago
Hi EdgarPach
Create a duplicates of "New folder", then combine files in "New folder(2)", remove "content" column in "New folder".
Then merge two table and expand columns
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Modify the Power Query M code in the Advanced Editor to preserve your columns. Look for the Table.SelectColumns transform.
Found it....!
Know what? 🙂
I am new at this
let
Source = Folder.Files("C:\Users\epacheco\OneDrive - Fresenius Medical Care\Desktop\Calibration"),
#"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Name], "Config Sheet")),
#"Filtered Hidden Files1" = Table.SelectRows(#"Filtered Rows", each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from Calibration (3)", each #"Transform File from Calibration (3)"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from Calibration (3)"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from Calibration (3)", Table.ColumnNames(#"Transform File from Calibration (3)"(#"Sample File (3)"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"Column1", type text}})
in
#"Changed Type"
- lbendlin6 years agoSuper User
Add your Last Modified Date column back in at that step.
- v-juanli-msft6 years agoCommunity Support
Hi EdgarPach
Create a duplicates of "New folder", then combine files in "New folder(2)", remove "content" column in "New folder".
Then merge two table and expand columns
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.