Forum Discussion
ale-hd
5 years agoHelper I
Conditional merge in query editor
Hi all, I am stucked in something... extremely difficult to me. Here you can download the (very small) pbix file Have 2 tables, "table 2" has unique values in column "ID 2". TABLE 1 ...
- 5 years ago
You can iterate through the table (you have to do it for each column) and replace null with the column value in the first row
[column] {0}
Here is the first step to do that - you still need to add the section logic.
let Source = Table.NestedJoin(#"Table 1", {"ID 2"}, #"Table 2", {"ID 2 "}, "Table 2", JoinKind.LeftOuter), Expand = Table.ExpandTableColumn(Source, "Table 2", {"DETAIL 1", "DETAIL 2 ", "DETAIL 3"}), #"Replaced Value" = Table.ReplaceValue(Expand,"",Expand[ID 2]{0},Replacer.ReplaceValue,{"ID 2"}) in #"Replaced Value"
lbendlin
5 years agoSuper User
You can iterate through the table (you have to do it for each column) and replace null with the column value in the first row
[column] {0}
Here is the first step to do that - you still need to add the section logic.
let
Source = Table.NestedJoin(#"Table 1", {"ID 2"}, #"Table 2", {"ID 2 "}, "Table 2", JoinKind.LeftOuter),
Expand = Table.ExpandTableColumn(Source, "Table 2", {"DETAIL 1", "DETAIL 2 ", "DETAIL 3"}),
#"Replaced Value" = Table.ReplaceValue(Expand,"",Expand[ID 2]{0},Replacer.ReplaceValue,{"ID 2"})
in
#"Replaced Value"