Forum Discussion

Tito's avatar
Tito
Helper IV
3 years ago

replace different values (as text) in Power Query

Hello everyone,
How can I replace different values (as text) in Power Query with other values (also as text) in the same column (i.e. without adding a conditional column !!).


For example:
Germany ==> Europe
Spain ==> Europe
Italy ==> Europe
Morocco ==> Africa
China ==> Asia

Thanks 🙂

2 Replies

  • rsbin's avatar
    rsbin
    Community Champion

    Tito ,

    In Power Query, right click your Country Column and select Replace Values.  You will get the following dialog box:

    And Replace away.  Personally, I would recommend you add another column to do this.

    Regards,

    • Tito's avatar
      Tito
      Helper IV

      Hi,
      Thanks. I don't want to replace the values like that because I have many different values that I need to replace. But that takes time. Therefore want to ask if there is a function in Power Query to be able to replace different values in the same column.