Forum Discussion
awtahhan
5 years agoRegular Visitor
Replace column values using Uri.parts function
Hello, I have a column with encoded URL values, I want to decode and replace these values using Uri.parts function, to do so I constructed the following poqwer query: Table.ReplaceValue(#"Ren...
- 5 years ago
Hi awtahhan
The initial error you posted stated We cannot convert a value of type List to type Text. so I expected that your url column contains Lists somewhere like this
To avoid that error you can use try..otherwise when creating your Custom Column in Power Query like this
try Uri.Parts("http://contoso?a=" & [url])[Query][a] otherwise [url]which gives this result
Check my file above for the full code example.
Regards
Phil
PhilipTreacy
Super User
5 years agoHi awtahhan
The initial error you posted stated We cannot convert a value of type List to type Text. so I expected that your url column contains Lists somewhere like this
To avoid that error you can use try..otherwise when creating your Custom Column in Power Query like this
try Uri.Parts("http://contoso?a=" & [url])[Query][a] otherwise [url]
which gives this result
Check my file above for the full code example.
Regards
Phil