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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
WorkWithCode
Frequent Visitor

Web-Api stops my dataset from refreshing

Hi all,

 

In powerquery i'm using a web-api function that can pinpoint a employees location. Only because of this function my dataset won't refresh. the error message I get is this: Query contains unsupported function. Function name: Web.Contents.

 

So after a little research I found that you can use the skip connection button but, even when that option turned on it still doesn't work. does anyone have the same problem?

 

This is the function is use:

= (location) =>

let
Bron = Xml.Tables(Web.Contents("http://dev.virtualearth.net/REST/v1/Locations/"&location&"?o=xml&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...")),
#"Type gewijzigd" = Table.TransformColumnTypes(Bron,{{"Copyright", type text}, {"BrandLogoUri", type text}, {"StatusCode", Int64.Type}, {"StatusDescription", type text}, {"AuthenticationResultCode", type text}, {"TraceId", type text}}),
ResourceSets = #"Type gewijzigd"{0}[ResourceSets],
ResourceSet = ResourceSets{0}[ResourceSet],
#"Type gewijzigd1" = Table.TransformColumnTypes(ResourceSet,{{"EstimatedTotal", Int64.Type}}),
Resources = #"Type gewijzigd1"{0}[Resources],
Location = Resources{0}[Location],
#"Type gewijzigd2" = Table.TransformColumnTypes(Location,{{"Name", type text}, {"EntityType", type text}, {"Confidence", type text}, {"MatchCode", type text}}),
Address = #"Type gewijzigd2"{0}[Address]
in
Address

1 REPLY 1
blopez11
Resident Rockstar
Resident Rockstar

There has been alot written about this in the community

You likely will need to break up the first parameter you are passing to webcontents to where the first paramter is just the base url, then use a combination of the relative path, query and header options to pass in the rest of your url

 

There are alot of articles on this that you can find searching the web, but I've included one below that I used:

https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors