Reply
Regular Visitor
Posts: 30
Registered: ‎10-19-2016
Accepted Solution

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

 


Accepted Solutions
Regular Visitor
Posts: 19
Registered: ‎07-20-2016

Re: Replace Value 2016 with 16 but withhin a text string

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

Highlighted
Moderator
Posts: 7,336
Registered: ‎03-06-2016

Re: Replace Value 2016 with 16 but withhin a text string

Hi @Dan80,

 

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

 

z1.PNGz2.PNG

 

z3.PNG

 

 

Best Regards,
Qiuyun Yu

View solution in original post


All Replies
Regular Visitor
Posts: 19
Registered: ‎07-20-2016

Re: Replace Value 2016 with 16 but withhin a text string

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

Highlighted
Moderator
Posts: 7,336
Registered: ‎03-06-2016

Re: Replace Value 2016 with 16 but withhin a text string

Hi @Dan80,

 

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

 

z1.PNGz2.PNG

 

z3.PNG

 

 

Best Regards,
Qiuyun Yu