Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 30 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 71 | |
| 59 | |
| 39 | |
| 22 | |
| 22 |