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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RAHULBANDI
Helper II
Helper II

remove Text "C"

Hi 

I have data-set with around 50k Records,

ex-data

C555354
C555355
555356
C555357
C555358
555359
C555360
C555361
555363
C555362
C555364
C555365
C555366
555367
555368
555381
555382

 

I have used custom column >> TextAfterdelimiter

it is showing as error >> cannot convert number to text

I want to remove "C" from the column

2 ACCEPTED SOLUTIONS
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Add a Custom Column with this formula:

if Text.Start(Text.From([Column1]), 1) = "C" then
     Replacer.ReplaceText([Column1], "C", "")
else
     [Column1]

Regards

View solution in original post

Vijay_A_Verma
Super User
Super User

There are many ways to accomplish this. One way is

= Text.Replace(Text.From([Data]),"C","")

This will look like this in Advanced Editor where you can make it type number

= Table.AddColumn(Source, "Custom", each Text.Replace(Text.From([Data]),"C",""), type number)

 

You can also use Table.ReplaceValue

Table.ReplaceValue(Source,each [Data],each Text.Replace(Text.From([Data]),"C",""),Replacer.ReplaceValue,{"Data"})

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

There are many ways to accomplish this. One way is

= Text.Replace(Text.From([Data]),"C","")

This will look like this in Advanced Editor where you can make it type number

= Table.AddColumn(Source, "Custom", each Text.Replace(Text.From([Data]),"C",""), type number)

 

You can also use Table.ReplaceValue

Table.ReplaceValue(Source,each [Data],each Text.Replace(Text.From([Data]),"C",""),Replacer.ReplaceValue,{"Data"})

Jos_Woolley
Solution Sage
Solution Sage

Hi,

Add a Custom Column with this formula:

if Text.Start(Text.From([Column1]), 1) = "C" then
     Replacer.ReplaceText([Column1], "C", "")
else
     [Column1]

Regards

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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