Forum Discussion

TM_Visual's avatar
TM_Visual
Icon for Advocate III rankAdvocate III
6 years ago
Solved

Replace text within a cell based on another field

I'm having trouble finding a solution to this issue, as there's lots of guides to similar, but different problems. Any help is appreciated. I have a table with university courses. I would like to re...
  • artemus's avatar
    6 years ago

    IT is probably easier if you use the UI to just add a column, and transform as you like (you can use column from example). If you like writing the code directly it would be:

     

    Table.TransformRows(#"Filtered Rows", each _ & [CourseTitle = Text.Replace([CourseTitle], "Master in Science in", if [CourseLevel] = "Undergraduate" then "Msci" else "Msc")])