March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello
I create a function and call it with a query. When I try to refresh it through the Portal, I get the following error.
I went back and looked at the reason one by one. The function cannot be refreshed because it is used in the query.
I wonder what prevents the renewal of the function?
"This dataset contains a dynamic data source. This dataset is not refreshed because dynamic data sources are not refreshed in the Power BI service. For more information, see https://aka.ms/dynamic-data-sources.
Data source for Query1,
FUNCTION
(produceName as text) as table =>
let
Kaynak = Json.Document(Web.Contents("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")),
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"
Help please
help please
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.
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şletilenColumn1
It 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.
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"
Help please
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |