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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Janica123
Helper I
Helper I

Conditional deletion of prefixes in one column

Hello All, 

 

I have the following problem:

In one column (column1) I have entries with a certain prefix ($:#:de:) as well as entries without a prefix. Now I would like to delete only the prefixes so that I get a result like the one in column 2.

Janica123_1-1699879329520.png

Is there a way to do this in Power Query?

2 REPLIES 2
Subash_Govind
Frequent Visitor

Hi Janica123,

Below M code for the prefix removing.

 

Table.ReplaceValue(#"Changed Type","$:#:de:","",Replacer.ReplaceText,{"Column1"})

AlienSx
Super User
Super User

Hello, @Janica123 

Table.TransformColumns(your_table, {"Column1", each Text.TrimStart(_, {"$", ":", "#", "d", "e"})})

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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 Kudoed Authors