Forum Discussion
Snowflake Dynamic M Query Parameter: "Query is too complicated to run" with 500+ items
Hi Arpit6075,
When using Dynamic M Query Parameters with an inline multi-select slicer, Power BI inserts the selected values directly into the native SQL. If many values are chosen, this can result in very large literal expressions, causing the Mashup Engine to fail with the error This query is too complicated to run. This issue happens before the query executes and is due to Power BI’s internal complexity checks. To avoid this, it’s recommended not to use large list-based parameters. Instead, apply set-based filtering, such as semi-joins with a table containing the selected values. This approach keeps the SQL compact, maintains query folding, and scales well with Direct Query.
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
Thank you.