Forum Discussion
onedayover
Helper III
4 years agoClear all cells within a table that contain a particular string
Hi All Would anyone know how I could change the code below to clear all cells within a table that have that same string and not just a single column? Example... = Table.ReplaceValue(#"Extract Inst...
- 4 years ago
Actually, this is probably more correct and uniform to the template:
Table.ReplaceValue(#"Extract Instance", "claimed", "", (x, y, z)=> if Text.Contains(x, y) then z else x, Table.ColumnNames(#"Extract Instance"))Cheers,
John
jbwtp
Memorable Member
4 years agoHi onedayover,
Sorry, my fault, because I gave you a code that clears the cells that equal to claimed exactly, not the ones that contain it.
This is the version to solve the contains scenario:
Table.ReplaceValue(#"Extract Instance", each [syllabus], null, (x, y, z)=> if Text.Contains(x, "claimed") then "" else x, Table.ColumnNames(#"Extract Instance"))
Cheers,
John
onedayover
Helper III
4 years agoThis works perfectly, thank you John!