Whole thing:
= Table.AddColumn(#"Previous Step", "Name of New Column", each #"Lookup Table"[LTTarget Field]{List.PositionOf(#"Lookup Table"[LTMatching Field], [Matching Field])},Text.Type)
= Table.AddColumn(#"Previous Step", "Name of New Column", each #"Lookup Table"[LTTarget Field]{List.PositionOf(#"Lookup Table"[LTMatching Field], [Matching Field])},Text.Type)
Where the "Target Field" is the one you want to get the value from using the "Matching field" in the current table which corresponds to the "LTMatching Field" in the other table.
Add a Column Box
Alternatively you can just do this through the add a column box where you'd just put:
#"Lookup Table"[LTTarget Field]{List.PositionOf(#"Lookup Table"[LTMatching Field], [Matching Field])}
Usually though it's better just to merge the two queries. I do suspect this method might be a bit quicker though.
No comments:
Post a Comment