Forum Discussion
Zdenek_Moravec
Jan 21, 2021Brass Contributor
Combine power query output table with manually maintained column in one excel table
I transform and load a CSV file into an excel sheet using Power Query: Column1 Column2.1 Column2.2 01.01.2021 A BC 01.02.2021 M NO 01.03.2021 X YZ Cus...
- Jan 22, 2021
Zdenek_Moravec Not too long ago, similar questions came up on this forum. Both were responded to by
Thought the technique to do this would come in handy but didn't think it was very straight-forward. So, I created some kind of tutorial for myself, writing the process down step-by-step. And it includes a working, tough very simple, example. See attached.
SergeiBaklan
Jan 22, 2021Diamond Contributor
Riny_van_Eekelen , I modified a bit, hope self-explainable
let
Source = Excel.CurrentWorkbook(){[Name="Source"]}[Content],
Source3 = Excel.CurrentWorkbook(){[Name="Source3"]}[Content],
SourceColumns = Table.ColumnNames(Source),
SourceColumns3 = Table.ColumnNames(Source3),
FirstTime = List.ContainsAll(SourceColumns, SourceColumns3),
Return = if FirstTime then Source else
Table.Join(
Source, SourceColumns,
Source3, SourceColumns
)
in
Return
Another table in your file.
FranzVerga
Jun 09, 2023Copper Contributor
SergeiBaklan I didn't understand the use of the third table and how does it integrates with the rest of the solution...
- SergeiBaklanJun 09, 2023Diamond Contributor
Please ignore. That was attempt to use Table.Join() instead of Table.NestedJoin(). But the former not always returns correct result.