Forum Discussion
Dataset contains a dynamic data source
- 1 year ago
Hi Anonymous ,
Thank you for the update.This error usually happens when you connect to a data source using a dynamically generated url.
Power BI blocks combining data from different sources with incompatible privacy levels for security reasons. When you dynamically construct a URL, Power BI cannot determine the privacy level of the resulting full URL, and it defaults to treating it as a combined source. If the root/base URL is set to a different privacy level than the dynamic part (e.g., parameter or other data source), it triggers a “Formula.Firewall” error or credential error.
Closing this dialog and going back to the Query Editor, if you click the Edit Credentials button, you can set credentials for the data source (anonymous access is fine in this case). For more information, please refer to: Chris Webb's BI Blog: Credentials, Data Privacy Settings And Data Sources In Power Query/Power BI
Please refer to these articles, might hold some useful tips:
http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra E.
Hi Anonymous ,
Even though you're not loading query1, Power BI still evaluates it during publishing and since query1 uses dynamic values in server name, database name, Power BI can't validate the source, and it triggers the dynamic data source error.
Try to replace "your-fixed-server" and "your-fixed-database" with your actual values , they must be static for Power BI Service.
Query 1
let
ServerName = "your-fixed-server", (Replace with your actual server)
DatabaseName = "your-fixed-database", (Replace with your actual database name)
Source = if Databasename <> "" then
try MySQL.Database(Servername, Databasename, [Returnsingledatabase=true])
otherwise #table({}, {})
else
#table({}, {}),
forecast = try Source{[Schema="", Item="forecast"]}[Data] otherwise #table({}, {})
in
forecast
Query 2
let
ResultfromQuery1 = Query1,
Finaldata = Table.Transformcolumns(ResultfromQuery1, {...})
in
Finaldata
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra E.
- Anonymous1 year agoNot applicable
Hi, thanks for your help! The solution still doesn't work, unfortunately 😞