Hi @Sifar
Assuming a folder with 4 Csv files:
NB: my Delimiter is ; so you might have to change it in step CsvAsTable:
let
Source = Folder.Files("PathToCsvFolder"),
RemovedOtherColumns = Table.SelectColumns(Source,{"Content"}),
CsvAsTable = Table.AddColumn(RemovedOtherColumns, "CsvAsTable", each
Table.PromoteHeaders(
Csv.Document([Content],[Delimiter=";", Encoding=65001, QuoteStyle=QuoteStyle.None]),
[PromoteAllScalars=true]
),
type table
),
RemovedContent = Table.RemoveColumns(CsvAsTable,{"Content"}),
MergedTables = List.Accumulate(
List.Skip(RemovedContent[CsvAsTable]), Table.AddIndexColumn(List.First(RemovedContent[CsvAsTable]),"Index",0,1),
(state,current) =>
let
Merged = Table.NestedJoin(
state,"Index",
Table.AddIndexColumn(current,"Index",0,1),"Index",
"MergedCurrent"
)
in
Table.ExpandTableColumn(Merged, "MergedCurrent",
List.Difference(Table.ColumnNames(current), Table.ColumnNames(state))
)
),
RemovedIndex = Table.RemoveColumns(MergedTables,"Index")
in
RemovedIndex