Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Replacing characters in a string based on another column

I'm sure this is just a syntax issue but I'm trying to replace a value in a string with another column. I   n this case I want the "99" in "Other (99)" to be the value of another column, "Cycle num...
  • edhans's avatar
    edhans
    4 years ago

    You used the wrong syntax. 

    each [field name]

     

    not 

     

    each "field name"

     

    Look at my code sample above.

     

    How to use M code provided in a blank query:
    1) In Power Query, select New Source, then Blank Query
    2) On the Home ribbon, select "Advanced Editor" button
    3) Remove everything you see, then paste the M code I've given you in that box.
    4) Press Done
    5) See this article if you need help using this M code in your model.