Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone,
How do I apply a text method in M code to a whole column?
I have
| ColumnA | ColumnB |
| 1 | abcFred |
| 2 | abcJane |
| 3 | Markabc |
| 4 | Jamabces |
| 5 | Emmabca |
I want
| ColumnA | ColumnB |
| 1 | Fred |
| 2 | Jane |
| 3 | Mark |
| 4 | James |
| 5 | Emma |
I know that I can use this method:
Text.Remove(text as nullable text, removeChars as any) as nullable text
But I can't work out what to put as the arguments if I want the function to work over a whole column.
Thanks
Solved! Go to Solution.
In the query editor, select your column and click on Replace Values in the ribbon. Just leave the 2nd field blank.
Pat
Try this one= Table.ReplaceValue(#"Changed Type","abc","",Replacer.ReplaceText,{"Column2"})
Hope this helps!
Try this one= Table.ReplaceValue(#"Changed Type","abc","",Replacer.ReplaceText,{"Column2"})
Hope this helps!
In the query editor, select your column and click on Replace Values in the ribbon. Just leave the 2nd field blank.
Pat
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 143 | |
| 123 | |
| 102 | |
| 79 | |
| 54 |