Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Replace value from another table exclude null

Hi there!   I have table 1 here with some incorrect data and would like to replace it based on the table 2. The value in red font is wrong, the correct data is in 2nd table.     with the ...
  • wdx223_Daniel's avatar
    3 years ago

     

    = Table.FromRecords(Table.TransformRows(Table1,each let a=Table2{[Year=[Year],ID=[ID]]}? in if a is null then _ else Record.TransformFields(_,Table.ToList(Table.SelectRows(Record.ToTable(a),each [Value]<>null and [Value]<>""),each {_{0},(x)=>_{1}}),1)))