Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
Is it somehow possible to add a SQL query hint like "OPTION (FORCE ORDER)" into an sql statement were i'm activating QueryFolding=true?
Example:
"SQL STATEMENT...OPTION (FORCE ORDER)", null,[EnableFolding=true])
When I try it will throw this error:
DataSource.Error: We cannot fold on top of this native query. Please modify the native query or remove the 'EnableFolding' option.
Probably not, because the SQL you enter in Value.NativeQuery gets used in a subquery, similar to what happens in DirectQuery mode as I described here: https://blog.crossjoin.co.uk/2022/03/06/why-not-all-sql-queries-can-be-used-as-a-source-in-power-bi-...), and the OPTION clause can be used inside a subquery (assuming you're writing TSQL: https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query?view=sql-server-ver16#r...).
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 8 | |
| 7 | |
| 6 |