Forum Discussion
Refresh issue on portal
Hi, Mekist
I am glad to help you.
You are experiencing an issue in Power BI related to dynamic data sources. Specifically, the error message indicates that the dataset contains a dynamic data source, and the Power BI service is unable to refresh the dataset that contains the dynamic data source. This is a known limitation of Power BI.
Data refresh in Power BI - Power BI | Microsoft Learn
Dynamic data sources are data sources for which you cannot determine the connection information until Power Query runs a query because the data was generated by code or returned from another data source.
In your case, the function you created uses Web.Contents to fetch data from a URL that contains a parameter (produceName). This makes the data source dynamic because the URL can change based on the input parameters.
To determine whether your dynamic data source can be refreshed, open the Data source settings dialog in Power Query Editor, and then select Data sources in current file. In the window that appears, look for the warning message, as shown in the following image:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello
It gives a warning as you stated, what can be done as a solution?
It does the refresh on the desktop, but it's a bit strange that it doesn't do it on the portal.
- Anonymous1 year agoNot applicable
Hi, Mekist
If possible, avoid using dynamic URL and instead use fixed URL to fetch data.
Alternatively, you can extract the dynamic part as parameters and then use these parameters in Power Query to construct the URL. you can refer to the following M code:
let produceName = "XXX", // Replace this with the actual produceName parameter url = "https://www.isyatirim.com.tr/_layouts/15/IsYatirim.Website/Common/Data.aspx/MaliTablo?companyCode=" & produceName & "&exchange=TRY&financialGroup=XI_29&year1=2024&period1=12&year2=2024&period2=9&year3=2024&period3=6&year4=2024&period4=3", Kaynak = Json.Document(Web.Contents(url)), value = Kaynak[value], TabloyaDönüştürüldü = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error), GenişletilenColumn1 = Table.ExpandRecordColumn(TabloyaDönüştürüldü, "Column1", {"itemCode", "itemDescTr", "itemDescEng", "value1", "value2", "value3", "value4"}, {"Column1.itemCode", "Column1.itemDescTr", "Column1.itemDescEng", "Column1.value1", "Column1.value2", "Column1.value3", "Column1.value4"}) in GenişletilenColumn1It is also possible to manually refresh the dataset in Power BI Desktop and then publish it to the Power BI service.
You can also change the data source to a local data source and then configure the Data Gateway to allow Power BI Service to access the local data source.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Mekist1 year ago
Helper III
Hello
Without a dynamic URL, only one company data can be retrieved, I need to retrieve multiple company data at the same time
let produceName = "ADEL", // Replace this with the actual produceName parameter url = "https://www.isyatirim.com.tr/_layouts/15/IsYatirim.Website/Common/Data.aspx/MaliTablo?companyCode=" & produceName & "&exchange=TRY&financialGroup=XI_29&year1=2024&period1=12&year2=2024&period2=9&year3=2024&period3=6&year4=2024&period4=3", Kaynak = Json.Document(Web.Contents(url)), value = Kaynak[value], #"Tabloya Dönüştürüldü" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Genişletilen Column1" = Table.ExpandRecordColumn(#"Tabloya Dönüştürüldü", "Column1", {"itemCode", "itemDescTr", "itemDescEng", "value1", "value2", "value3", "value4"}, {"Column1.itemCode", "Column1.itemDescTr", "Column1.itemDescEng", "Column1.value1", "Column1.value2", "Column1.value3", "Column1.value4"}) in #"Genişletilen Column1"- Mekist1 year ago
Helper III
Help please