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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
AU555
Helper I
Helper I

Dynamic data sources in Power BI service - REST API

Hi all, 

I started to maintain one dashboard that I have not started creating... and I had to change all  paths to relative paths to enable refresh in PBI service. It works just fine, except for one query, not sure where this query comes from, there is not even any host path:

 

(Invoice as text) =>
let
Source = Json.Document(Web.Contents(Invoice & "?pagesize=1000",[Headers=[#"X-appSecretToken"=#"xxxxx", #"X-AgreementGrantToken"=#"Xxxxx", #"Content-Type"="application/json"]])),
lines = Source[lines],
#"Converted to Table" = Table.FromList(lines, Splitter.SplitByNothing(), null, null, ExtraValues.Error),

in
#"Converted to Table"

 

 

How do I change this to relative path, any ideas? 🙂 

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @AU555,

 

Is your issue solved?

If the issue has been solved, please adopt your solution to help others.

Thanks! 😉

 

 

Best Regards,
Link

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

v-xulin-mstf
Community Support
Community Support

Hi @AU555,

 

There are several blog posts on how to work around this problem.

Web.Contents(), M Functions And Dataset Refresh Errors In Power BI

Dynamic Web.Contents() and Power BI Refresh Errors

Using The “Skip Test Connection” Option For Power BI Data Sources To Avoid Scheduled Refresh Failure...

 

Best Regards,
Link

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

ibarrau
Super User
Super User

Hi. This is not a query. This is function. Check its name because it might be called from a query. The parameter "invoice" might have most of the link. It should contain PrimaryURL + Relative Path. The rest of the content of the query is in the function like "?pagesize =". You might want to re organize that too in a "query" statement. You can see an example of the best practice to handle a url in this link.

https://blog.ladataweb.com.ar/post/630597294839955456/powerquery-buena-práctica-para-un-web-request

If you are able to split the relative path and query from the calls the query is doing on the function you might be able to connect the dynamic data.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

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 Kudoed Authors