So I have this PQ that merges two tables. In on eof the tables theres a column called 'Bib#' - the other does not have this. I want the column populated when the column is empty.
The second tables holds another column ('Data'), that can be used to find the corresponding value ('Bib') to inset into'Bib#' from a third table ('Runners').
I have this script that has the lookup working perfect, but it adds another column, which I would perfer not to do. Perhaps somebody here can help me rewrite it to simply update 'Bib#' if null?
The second tables holds another column ('Data'), that can be used to find the corresponding value ('Bib') to inset into'Bib#' from a third table ('Runners').
I have this script that has the lookup working perfect, but it adds another column, which I would perfer not to do. Perhaps somebody here can help me rewrite it to simply update 'Bib#' if null?
Power Query:
= let
Source = UniqueID,
AddDebugColumns = Table.AddColumn(Source, "BibNo", each
if [Data] = null then null else
let
LookupTable = Runners,
LookupValue = [Data],
MatchingRows = Table.SelectRows(LookupTable, each [ChipID] = LookupValue),
LookupResult = if Table.RowCount(MatchingRows) > 0 then MatchingRows{0}[Bib] else null
in
LookupResult)
in
AddDebugColumns