Forum Discussion
Web.BrowserContents Refresh Error Power BI Services
- Anonymous4 years ago
Hi pankajj
Your table is based on query and it is a dynamic data source. If I add ID in code directly, it seems that we could refresh this report with gateway in Power BI. Try to use parameter to get dynamic tracking id. You can add all ids you need in parameter list, and you can change the id you get by parameter in Desktop and Service.
let Source = Web.BrowserContents("https://www.ship24.com/tracking?p=" & #"Tracking ID"), #"Extracted Table From Html" = Html.Table(Source, {{"TrackingID", ".md\:text-2xl"}, {"Status", ".md\:w-34pc"}, {"Courier", "APP-USER-COURIER-LABEL"}, {"Origin", ".j-sh:nth-child(1)"}, {"Destination", ".j-sh:nth-child(3)"}, {"Delivered on", ".capitalize"}}, [RowSelector="USER-PARCEL-CARD"]) in #"Extracted Table From Html"Then download a gateway and configure the credential. Then you can schedule refresh your report.
For reference:
What is an on-premises data gateway?
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Thanks so much for your help. I will try your method.
I am able to get the data using Web.BrowserContents in Power BI Desktop but not in Power BI Service.
Can you suggest, how to edit the following query to make it refreshable in Power BI Service to get the same result using Tracking ID : 3407985361
I am expecting, following result:
Looking forward to hearing from you.
Thanks so much for your help.
Best regards,
Pankajj
The service seems to be malfunctioning at the moment - I get a 500 error when querying by that ID.
- pankajj4 years agoHelper III
lbendlin & Anonymous
Please find below a link to the Power BI file. I am not getting any error with the function fxtracking.
Hoping, you would be able to help in editing the query by using RelativePath, Query and replacing Html.Table to let it refresh automatically. without the below error.
- Anonymous4 years agoNot applicable
Hi pankajj
Your table is based on query and it is a dynamic data source. If I add ID in code directly, it seems that we could refresh this report with gateway in Power BI. Try to use parameter to get dynamic tracking id. You can add all ids you need in parameter list, and you can change the id you get by parameter in Desktop and Service.
let Source = Web.BrowserContents("https://www.ship24.com/tracking?p=" & #"Tracking ID"), #"Extracted Table From Html" = Html.Table(Source, {{"TrackingID", ".md\:text-2xl"}, {"Status", ".md\:w-34pc"}, {"Courier", "APP-USER-COURIER-LABEL"}, {"Origin", ".j-sh:nth-child(1)"}, {"Destination", ".j-sh:nth-child(3)"}, {"Delivered on", ".capitalize"}}, [RowSelector="USER-PARCEL-CARD"]) in #"Extracted Table From Html"Then download a gateway and configure the credential. Then you can schedule refresh your report.
For reference:
What is an on-premises data gateway?
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.