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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
thyjones
Helper I
Helper I

Problem receiving data from web service

Good Afternoon,

 

I have a visual which basically conects to a web service, it is calling an API that returns a score. In Power BI Desktop, I can see this score fine, and it updates/changes accordingly. As soon as the report is published, all other metrics work but this one shows blank, even though there is a number.

 

I have concluded therefore for whatever reason the web service is blocking the request.

 

The API link basically is a customised link BUT a password etc is not required.

 

What I have noticed is, there is a gateway set to this web url, which maps to a datasource, this datasource set, with authenitication method anonymous, no privacy settings. I am not sure why this gateway is there, I am not sure if it was always there and has stopped working or has been added by accident (I don't think I need it), but, if i remove it, it breaks because it says the report is looking for a gateway.

 

Any ideas please?

Thanks

 

 

6 REPLIES 6
collinq
Super User
Super User

HI @thyjones ,

 

If there are no data sources that are inside your organization then you do not need a gateway.  A gateway is only required if you are trying to reach into your organization.  If you do have the need for a gateway then you will have more than one data source in your report.

If you do not need a gateway at all for this report and the report thinks it should be using a gateway, then go to datasets settings and select the "gateway connection" and turn off "Use a data gateway".  

Let us know if that resolves it!




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Hi Collinq, thank you for such a quick reply.

 

Now I do use a gateway for other bits, and this has been fine, so I need to keep the gateway, it is just that i don't think I need a gateway for this web/api request. How can I turn off just this one? As I say i deleted the datasource but it broke, and I only seem to have the option to point the gateway/web url to a datasource, but not delete it, if that make sense?

Hi @thyjones ,

 

I guess we should take a step back and go through the steps.  In the PBI Desktop file, you have more than one datasource, correct?  And, check the type of privacy level connection (Private, Organizational,etc) and then publish.

In the Service check the Gateway itself to confirm that it is working (use the "test connection") and confirm that the Privacy Level for the gateway is the same as your report.

In the Service, go to the Dataset and settings and then confirm that the Gateway Connection is set up appropriately for the report.  And, that there is no error message there either.

Let us know if that resolves it.

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Thanks for your input again.

 

So, in PowerBI desktop, I've checked the data source settings for the query, set to Anonymous and privacy level none.

 

I've checked the Gateway clusters and under the gateway ive checked the data source, which is set to authentication method Anonymouse an privacy level none. It also shows Connection Successful. The gateway appears to be working fine.

 

I can manually and with scheduled refresh, refresh the dataset, and there is no issue.

 

I've changed from say anonymous to web api, and back to different settings in case something was wrong, and strangely it worked temporarily (the figure I am expecting popped up on the report), but i refreshed the report and it has gone back to being blank..

 

Confused!

 

 

 

 

 

 

 

Hi @thyjones 

Please check how did you connect to your data source, by Web.BrowserContents or Web.Contents?

Did you use Booleans in your filters?

I found an issue like yours, I hope it could help you.

Issue: Visualization BLANK after refreshing page in Power BI service

 

Best Regards,

Rico Zhou

 

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

Hi RicoZhou,

 

To answer your questions:

= Web.BrowserContents("https://app.website.com/api.php?apiKey=abcdef&getMethod=getNPSValue" & "&fromDate=2020-12-01" & "&toDate=2020-12-31")

 

I don't use booleans as far as I know, this is my process:

 

let
Source = Web.BrowserContents("https://app.website.com/api.php?apiKey=abcdef&getMethod=getNPSValue" & "&fromDate=2020-12-01" & "&toDate=2020-12-31"),
#"Converted to Table" = #table(1, {{Source}}),
#"Replaced Value" = Table.ReplaceValue(#"Converted to Table","<html><head></head><body>","",Replacer.ReplaceText,{"Column1"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","</body></html>","",Replacer.ReplaceText,{"Column1"}),
#"Renamed Columns" = Table.RenameColumns(#"Replaced Value1",{{"Column1", "NPS"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"NPS", Int64.Type}})
in
#"Changed Type"

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors