Forum Discussion
How to refresh the data
- 2 years ago
Good job,
That's normal it can take couple minutes to see the updates applied on the page or just refresh it and you will see it right after
Where is "Query 1" coming from? I have 12 queries in my report. None of them are called "Query 1"
Your issue is due to refreshing dynamic Datasources. I found this for you
Certainly! Refreshing dynamic data sources in Power BI Service can be tricky, especially when dealing with APIs and dynamic content. Let’s tackle this step by step:
Dynamic Data Sources in Power BI Service:
- When you create a dataset in Power BI that includes dynamic data sources (such as APIs), you might encounter issues during refresh in the Power BI Service.
- The error message you’ll see is: “This dataset includes a dynamic data source. Since dynamic data sources aren’t refreshed in the Power BI service, this dataset won’t be refreshed.”
The Challenge:
- Unlike Power BI Desktop, where dynamic data sources work seamlessly, the Power BI Service doesn’t automatically refresh them.
- The issue arises because certain features (like paging with nextLink) behave differently between Power BI Desktop and the Service.
Workaround:
- To overcome this limitation, you can modify your query to handle paging correctly.
- Here’s an example of how you can adjust your code to make it work in both Power BI Desktop and the Service:
let
GetPages = (Path) =>
let
Host = "https://management.azure.com/subscriptions/",
Source = Json.Document(Web.Contents(Host, [RelativePath = Path])),
LL = @Source[value],
Next = Text.Replace(Source[#"nextLink"], Host, ""),
result = try @ll & @GetPages(Next) otherwise @ll
in
result,
Fullset = GetPages(SubscriptionId & "/resources?api-version=2019-05-01")
in
FullsetExplanation:
- In the modified code:
- We use the GetPages function to handle paging correctly.
- The Next variable extracts the next page URL from the response.
- The try function ensures that the recursion stops when there are no more pages.
- Finally, we get the complete dataset using Fullset.
- In the modified code:
Apply to Your Scenario:
- Replace the URL and parameters in the Host variable with your specific API endpoint.
- Adjust the query according to your dynamic data source.
Remember, this workaround ensures that your dynamic data sources are refreshed in both Power BI Desktop and the Service. If you encounter any issues, feel free to ask for further assistance! 🚀
also in the community many had faced the same issue, check them out
Search - Microsoft Fabric Community