Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there,
So I made a report and getting this error when I try and refresh it on the website.
I have a table with a database names in a column and a couple of other queries that loops through this table and queries data from these databases...
I find it both annoying and stupid if this is "too much" for Power Bi to handle..?
Why do I need to make my report "dumber" just to get the refresh stuff to work?
Can someone please help me out here....
https://i.imgur.com/OILP29w.png
Example:
let
// Define a parameter named "DatabaseTable" that contains a list of records with both DatabaseName etc...
DatabaseData = Table.ToRecords(#"DatabaseTable"),
// Define a function that takes a record as input and returns data from the "ProductLines" table with an extra column for the database name.
GetProductLines = (record) =>
let
DatabaseName = record[DatabaseName],
Integration = record[Integration],
// Connect to the database.
Source = Sql.Database("XXXXXXXXXXXXXXXXXX", DatabaseName),
// Check if the "ProductLines" table exists.
ProductLinesExists = List.Contains(Source[Name], "ProductLines"),
// Determine which query to use based on the Integration value.
Query = "SELECT * FROM XXXXXXXXXX WHERE Id IN (SELECT ProductId FROM XXXXXXXXXX)",
// If the table exists and the Query is not empty, get its data.
Data = if ProductLinesExists and Query <> "" then
Sql.Database("XXXXXXXXXXXXX", DatabaseName, [Query=Query])
else
#table({}, {}),
// Add a new column for the database name.
AddedDatabaseName = Table.AddColumn(Data, "DatabaseName", each DatabaseName)
in
AddedDatabaseName,
// Now I call the "GetProductLines" function for each record in the "DatabaseData" parameter.
ProductLinesList = List.Transform(DatabaseData, each GetProductLines(_)),
// Now I combine all tables in the "ProductLinesList" into one table using a union all.
UnionAll = Table.Combine(ProductLinesList),
#"Filtered Rows" = Table.SelectRows(UnionAll, each true)
in
#"Filtered Rows"
Hi @Shamatix ,
The reason why Power BI Service does not support this query is security.
Power BI Desktop also gives you a security warning and also asks you for credentials, but you can turn off these security warnings completely and once they are confirmed they also do not appear again.
Possible solutions are:
BR
Martin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.