Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Basic Data Engineering | M Code Noob | How to extract only what you want into a new column?

Hi folks,   I've been using PQ easy UI for a while now, but am realizing that I will eventually have to start learning M CODE to fulfill certain requirements.   I have a flat CSV file with client...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Type this into the formula bar:

     

    = Table.AddColumn(#"Name of Table or Previous Step Name", "New Column", each if Text.Contains([Consultant Role], "mROC Lead") then Text.Replace([Consultant Role], "mROC Lead", "") else "")

     

    --Nate