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
Lakshmi_Koduri
Microsoft Employee
Microsoft Employee

undefinedA relative URI cannot be created because the 'uriString' parameter represents an absolute U

Hi All,

 

I need a help with a Power Query error. Below is the Power Query where I have a parameter and get data from a Web connection using that parameter value. But this is giving me the following error:

A relative URI cannot be created because the 'uriString' parameter represents an absolute URI

Power Query:

let

Custom1 = Text.Replace(#"EnrollmentID or BillingAccountID",":","__"),
FilePath = "Folder1/"&Custom1&"/Folder2/File1",
PathEncode = Uri.EscapeDataString(FilePath) ,
RelPath = #"EnrollmentID or BillingAccountID" & "/" & PathEncode,
Custom2 = Csv.Document(Web.Contents("https://abc.powerapps.com/customerenroll/data", [RelativePath=RelPath]),[Delimiter=",", Columns=13, Encoding=65001, QuoteStyle=QuoteStyle.None]),

#"Promoted Headers" = Table.PromoteHeaders(Custom2, [PromoteAllScalars=false])

in
#"Promoted Headers"

 

I couldn't understand why this error is coming up as the same Power Query is working fine with our test Web url. Can someone help me identify/fix this issue?

 

Thanks

Lakshmi Koduri

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Lakshmi_Koduri 

 

What does #"EnrollmentID or BillingAccountID" refer to? Is it a step in another query and its result is a text string?

 

If you use RelPath to replace #"Promoted Headers" after "in" statement, does it return the correct RelPath value? Because in your Custom1 step, you replace ":" with "__" in #"EnrollmentID or BillingAccountID", but in RelPath = #"EnrollmentID or BillingAccountID" & "/" & PathEncode step, you use #"EnrollmentID or BillingAccountID" again and it still has ":" in it. I think this shouldn't be included in the URI, this may be the cause.

 

You need to ensure RelPath returns the correct value in the correct format first.

 

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

Lakshmi_Koduri
Microsoft Employee
Microsoft Employee

Hi @Garrysfarrell 

No, should be part of the common URL and only the #"EnrollmentID or BillingAccountID" & "/" & PathEncode part of the URL should be in Relative path as its dynamic. That's how our Service API is built. If I use "/customerenroll/data" in Relative path, the OAuth authentication itself will not be supported to connect and get contents from the API. I have tested this way and it didn't work.

 

Garrysfarrell
Frequent Visitor

Hi, Should this "/customerenroll/data" part of URL be added to the relative path?

 

RelPath = "/customerenroll/data" & #"EnrollmentID or BillingAccountID" & "/" & PathEncode,

Custom2 = Csv.Document(Web.Contents("https://abc.powerapps.com", [RelativePath=RelPath]),

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.

Top Kudoed Authors