Forum Discussion

iKiok's avatar
iKiok
Frequent Visitor
7 years ago

Power Query - (M code) - replace text in a column with values from a column in another query

Greetings to all,

 

I would like to replace many individual values in a column with values that exist in another query.

 

I cannot merge since I would like it to be a "text contains" replacement.

 

Any help with the correct "table[column]" reference to the other query would be appreciated

 

= Table.ReplaceValue(#"Renamed Columns",Replacements[original],(Replacements[replacement],Replacer.ReplaceText,{"Activity"})

4 Replies

    • iKiok's avatar
      iKiok
      Frequent Visitor

      Mariusz here is the data in 2 queries. Normally I would run 20 steps of "Replace Value", so now I am looking to make it happen a bit faster and easier

       

      Column where values need to be replacedReplacements Table

      • Mariusz's avatar
        Mariusz
        Community Champion

        Hi iKiok,

        is there any chance you could prepare a sample of data that preserves the logic of your data and is easy to copy and work with?

        Many Thanks

        Mariusz