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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Dan80
Helper II
Helper II

Replace Value 2016 with 16 but withhin a text string

Hi, I am working in power query and need to transform some data within a column, the question appears simple enough:

 

Where there is 2016 replace with 16. 

 

However, 2016 is in the middle of a random text string and so Replace values doesn't work as it is looking up 2016 the number.  Anyone know a work around?  Thanks,

 

dan

 

2 ACCEPTED SOLUTIONS
radpir
Resolver II
Resolver II

hi,

 

try adding a custom column:

= Text.Replace([YOUR TEXT COLUMN NAME HERE], "2016", "16")

 

please note that this will replace all occurances of the 2016 within the text which is or is not what you may want.

 

regards,

radpir

View solution in original post

v-qiuyu-msft
Community Support
Community Support

Hi @Dan80,

 

You can also open Query Editor, then use Replace Values feature:

 

z1.PNGz2.PNG

 

z3.PNG

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @Dan80,

 

You can also open Query Editor, then use Replace Values feature:

 

z1.PNGz2.PNG

 

z3.PNG

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
radpir
Resolver II
Resolver II

hi,

 

try adding a custom column:

= Text.Replace([YOUR TEXT COLUMN NAME HERE], "2016", "16")

 

please note that this will replace all occurances of the 2016 within the text which is or is not what you may want.

 

regards,

radpir

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors