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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
prill2ta
Advocate II
Advocate II

Web.Contents moving '?' clause to the end of the string

Hello, Can anyone help me figure out why Power Query is moving the clause of my api string to the end?  

Example: 

I type:  Web.Contents("https://api-domain.com/v1/active?licenseNumber=123",[RelativePath="&ID="&[Id]])

It returns and Error Data Path that is: Data Path = https://api-domain.com/v1/active&ID=abc?licenseNumber=123

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please try using the Query term of Web.Contents instead as follows

 

Web.Contents("https://api-domain.com/v1/active",[RelativePath="&ID="&[Id], Query = [licenseNumber="123"]])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @prill2ta ,

 

Please try the method @mahoneypat provided.

 

In addition, some documents for reference:

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An...;

Chris Webb's BI Blog: Web.Contents(), M Functions And Dataset Refresh Errors In Power BI Chris Webb'...;

Power BI Relative Path Fix for Web Contents Dataset Refresh Errors In Power BI Service - YouTube.

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

mahoneypat
Microsoft Employee
Microsoft Employee

Please try using the Query term of Web.Contents instead as follows

 

Web.Contents("https://api-domain.com/v1/active",[RelativePath="&ID="&[Id], Query = [licenseNumber="123"]])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors