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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors