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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
freidav1984
Frequent Visitor

Data refresh fails in service - API endpoint called with function

Hi All!

 

I have a really frustrating issue I cannot solve. Any help would be greatly appreciated!

 

I have created a dataset, which gains data from several API endpoints. In Desktop, refreshing works fine!

After I publish the dataset to the service, I set the correct authentication method in the BI service, after the first scheduled refresh my refreshed dataset becomes corrupted, thus, my visualizations fail to show the correct data.

 

I think, I found the issue which might cause the problem, but I cannot find any workarund solution.

 

The problem:

1. I created a function which calls data from my API endpont (1). I used the function, because I need to call the data by pages.

 

let Query = (page as text) =>
let
    Source = Json.Document(Web.Contents("https://xxxxxxx/yyyyyyy/zzzzzzz/qqq/positions", [RelativePath = "?page="& page &"&per_page=100&status=publish,draft,pending"]))
in
    Source
in Query

As I called the function above, I got a table of different positions, which has an ID column.

 

2. Based on the ID column of the above mentioned result table, I call another function (see below) and I add the result to a new column.

 

let Query = (parent as text) =>
let
    Source = Json.Document(Web.Contents("https://xxxxxxxxx/yyyyyyyyy/zzzz/qqqqq/poziciok", [RelativePath = "/"& parent ]))
in
    Source
in Query

 

If I call these functions in the Desktop I get all the positions I need, and all the parent records, which are connected to my initial table.

But if I download my dataset from the Power bi service after the first refresh, it seems that some of my parent records are missing without returning any error message on refresh.

If I click refresh in the desktop, the missing parent data are showing up again. 

 

Any thoughts on this issue? Could the problem be caused by calling technically the same endpoints in the functions? I double-checked, my dataset settings and authentication data are correct both in the destkop and in the service as well.

 

Thanks in advance!

 

David

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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