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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors