Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MichaelF1
Helper III
Helper III

Power query text methods

Hi everyone,

 

How do I apply a text method in M code to a whole column?

 

I have 

ColumnAColumnB
1abcFred
2abcJane
3Markabc
4Jamabces
5Emmabca

 

I want

ColumnAColumnB
1Fred
2Jane
3Mark
4James
5Emma

 

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 

 

 

 

 

 

2 ACCEPTED SOLUTIONS
ppm1
Solution Sage
Solution Sage

In the query editor, select your column and click on Replace Values in the ribbon. Just leave the 2nd field blank.

ppm1_0-1689597907464.png

 

Pat

Microsoft Employee

View solution in original post

Legend_11
Resolver I
Resolver I

Try this one= Table.ReplaceValue(#"Changed Type","abc","",Replacer.ReplaceText,{"Column2"})

 

Hope this helps!

View solution in original post

2 REPLIES 2
Legend_11
Resolver I
Resolver I

Try this one= Table.ReplaceValue(#"Changed Type","abc","",Replacer.ReplaceText,{"Column2"})

 

Hope this helps!

ppm1
Solution Sage
Solution Sage

In the query editor, select your column and click on Replace Values in the ribbon. Just leave the 2nd field blank.

ppm1_0-1689597907464.png

 

Pat

Microsoft Employee

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors