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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kemppaik
Frequent Visitor

Dataset can not be refreshed in workspace

I'm trying to generate some reports to pull from a REST API.  I can get the queries to work from a desktop and refresh the data on demand with no issues.  However, when the report gets published to the workspace, the dataset can not be refreshed.

 

This is one of the data queries:

kemppaik_0-1616782016423.png

 

This works when on the desktop.  When it gets uploaded into the Workspace we are getting this error.

kemppaik_1-1616782098444.png

How can I get around this?

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @kemppaik 

In PBI Service the URL you are querying must be static, so you need to split the URL into the root domain, and supply everything else in the Relative_Path parameter, e.g.

api_url = "https://us.api.knowbe4.com/",
RelPath = "v1/phishing/security_tests/" & PSTID & "/recipients?per_page=500",

data= Json.Document(Web.Contents(api_url,
   [ 
     RelativePath = RelPath,
     Headers = ...............
   ]
   )
   )

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

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

6 REPLIES 6
PhilipTreacy
Super User
Super User

Hi @kemppaik 

In PBI Service the URL you are querying must be static, so you need to split the URL into the root domain, and supply everything else in the Relative_Path parameter, e.g.

api_url = "https://us.api.knowbe4.com/",
RelPath = "v1/phishing/security_tests/" & PSTID & "/recipients?per_page=500",

data= Json.Document(Web.Contents(api_url,
   [ 
     RelativePath = RelPath,
     Headers = ...............
   ]
   )
   )

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

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi @PhilipTreacy ,

 

This has helped me get further.  Any ideas why I'm getting messages about why my applied steps are causing this error when refreshing the dataset in the workspace?  I don't get an error on my desktop.

kemppaik_0-1617033561263.png

 

This is my KB4TrainingCampaignsUserSettings Query:

kemppaik_1-1617033617539.png

 

 

This is the KB4Training CamaignUsers function that I was originally having issues with - but now seems to be resolved:

 

kemppaik_2-1617033691127.png

Thanks.

Hi @kemppaik ,

 

The error message means within the same query, you’re trying to access multiple data sources and they’ve been set up with incompatible privacy levels.

 

You need to head over to the Data Source Settings window and set up your ALL your data sources in that query to the same privacy level; either ALL Public or ALL Organizational.

 

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

 

Best Regards,

Dedmon Dai

I only have one data source,  I've tried every privacy setting and still get the same error.

kemppaik_0-1617112523642.png

 

Hi @kemppaik ,

 

Would you please try to edit the privacy level in data source settings in power bi service? the operation on desktop will not effect the settings in power bi service.

 

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

 

Best Regards,

Dedmon Dai

It is already the same as what is in my desktop:

kemppaik_1-1617199333849.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.