Forum Discussion

cllkaya's avatar
cllkaya
Frequent Visitor
4 years ago
Solved

If null replace with next cell

I would like to bring "lookupares.BS Code" value to "BS Code" column, if the "BS Code" column value is null. Coudl you help 

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi cllkaya ,

     

    You may add a conditional column like

     

    Then remove the original column and rename the new column

     

     

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • CNENFRNL's avatar
    CNENFRNL
    Community Champion
    = Table.ReplaceValue(#"preceding step", each [BS Code], each if [BS Code] is null then [lookupares.BS Code] else [BS Code], Replacer.ReplaceValue, {"BS Code"})
  • cllkaya's avatar
    cllkaya
    Frequent Visitor

    Expression.Error: The import preceding step matches no exports. Did you miss a module reference?

     

    I must miss a very basic thing, code gives an error message above

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi cllkaya ,

     

    You may add a conditional column like

     

    Then remove the original column and rename the new column

     

     

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.