Forum Discussion

ovetteabejuela's avatar
ovetteabejuela
Impactful Individual
9 years ago
Solved

Power Query | Batch Replace String

Hi,   How do I replace this: Foreign Language 1 Foreign Language 2 Foreign Language 3 Foreign Language 4 Foreign Language 5 Foreign Language 6     into this in a single pass: In ...
  • MarcelBeug's avatar
    MarcelBeug
    9 years ago

    In that case you can use this code:

     

    = Table.TransformColumnNames(Table1, each try Translations{[Foreign = _]}[English] otherwise _)

    It searches each column name in the Translations table and - if found - replaces it with English; if not found then leave it as is.