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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to convert these encode url to normal text.

Dear PBI Community,

 

I tried to decode the URI as below, but i got the error

Adlina_0-1646991043734.png

 

As i know PowerBi dont have this function  UriUnescapeDataString.

Kindly help me.

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can use Uri.Parts to decode a Uri part. There is an example in the previous link. 

vjingzhang_0-1647315544356.png

 

You can convert above code to create a custom function like below and name it as UriUnescapeDataString. Create a blank query and open its Advanced Editor. Paste the following code there. 

(data as text) as text =>
let 
    DecodedText = Uri.Parts("http://contoso?a=" & data)[Query][a]
in
    DecodedText

 

Then invoke this custom function in other queries just like using built-in functions. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can use Uri.Parts to decode a Uri part. There is an example in the previous link. 

vjingzhang_0-1647315544356.png

 

You can convert above code to create a custom function like below and name it as UriUnescapeDataString. Create a blank query and open its Advanced Editor. Paste the following code there. 

(data as text) as text =>
let 
    DecodedText = Uri.Parts("http://contoso?a=" & data)[Query][a]
in
    DecodedText

 

Then invoke this custom function in other queries just like using built-in functions. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Anonymous
Not applicable

Yeahh, thank you.

 

amitchandak
Super User
Super User

@Anonymous , You have a few in power query

https://docs.microsoft.com/en-us/powerquery-m/uri-functions

 

https://community.powerbi.com/t5/Desktop/URL-Encoding-While-passing-passing-parameter-thru-URL/m-p/512229

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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