Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

ReplaceValue with two conditions

#"Valor Substituído99" = Table.ReplaceValue(#"Valor Substituído95", each[BAIRRO], each if[Município]="Arapiraca" and [Bairro]="São Luiz" then "São Luiz I" else[BAIRRO], Replacer.ReplaceText,{"BAIRRO"}),

 

The code above does not point to any sintax error, however it doesn't replace the value specified. Is there any way I can do this without creating any additional column?

  • Hi Anonymous ,

    Try to use Replace values option in the Transform menu and refer the formula:

    = Table.ReplaceValue(#"Changed Type",each [BAIRRO],each if  [Municipio] = "Arapiraca" and [BAIRRO] = "Sao Luiz" then "Sao Luiz I" else [BAIRRO] ,Replacer.ReplaceText,{"BAIRRO"})

     

    Best Regards,
    Yingjie Li

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

     

2 Replies

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi Anonymous ,

    Try to use Replace values option in the Transform menu and refer the formula:

    = Table.ReplaceValue(#"Changed Type",each [BAIRRO],each if  [Municipio] = "Arapiraca" and [BAIRRO] = "Sao Luiz" then "Sao Luiz I" else [BAIRRO] ,Replacer.ReplaceText,{"BAIRRO"})

     

    Best Regards,
    Yingjie Li

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

     

  • Anonymous look at this similar post.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!