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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
NiugeS
Helper V
Helper V

Removing Text in Added Column

Hi,

 

New to PowerBi.  

I have a column that contains names and the word 'brother' with a '-' and sometimes spacing as per below.  I want to create a new column based on the orginal column but remove the '-' and the word 'brother'.  Sometimes there are '-' within the name.

 

Name A-brother

Name B - brother

Name-Name C-brother

 

Thank you

 

2 ACCEPTED SOLUTIONS
HotChilli
Community Champion
Community Champion

Keep it simple by right-clicking the column.  Choose replace values.  Type -brother in the 'value to find' and don't put anything in the other.  Click ok.

Repeat with - brother

View solution in original post

dax
Community Support
Community Support

Hi @NiugeS , 

Yes, you could refer to @HotChilli 's suggestions, click "Edit Queries", then tranform it by "repalce" like below 

610.PNG

611.PNG

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8kvMTVVw1E0qyi/JSC1SitWBCjkp6CqgC+qCZZwRimMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [NAME = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"NAME", type text}}),
    #"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "NAME", "NAME - Copy"),
    #"Replaced Value" = Table.ReplaceValue(#"Duplicated Column","-","",Replacer.ReplaceText,{"NAME - Copy"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","brother","",Replacer.ReplaceText,{"NAME - Copy"})
in
    #"Replaced Value1"

 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
dax
Community Support
Community Support

Hi @NiugeS , 

Yes, you could refer to @HotChilli 's suggestions, click "Edit Queries", then tranform it by "repalce" like below 

610.PNG

611.PNG

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8kvMTVVw1E0qyi/JSC1SitWBCjkp6CqgC+qCZZwRimMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [NAME = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"NAME", type text}}),
    #"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "NAME", "NAME - Copy"),
    #"Replaced Value" = Table.ReplaceValue(#"Duplicated Column","-","",Replacer.ReplaceText,{"NAME - Copy"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","brother","",Replacer.ReplaceText,{"NAME - Copy"})
in
    #"Replaced Value1"

 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @dax 

HotChilli
Community Champion
Community Champion

Keep it simple by right-clicking the column.  Choose replace values.  Type -brother in the 'value to find' and don't put anything in the other.  Click ok.

Repeat with - brother

Thank you @HotChilli 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.