Forum Discussion
Anonymous
2 years agoNot applicable
Direct query syntax returns data in PowerQuery perfectly but shows error when update PowerBI project
When I run this Direct query syntax (calling a stored procedure in SQL Server) it returns data in PowerQuery perfectly without error and displays the returned data in the table. However when I...
- 2 years ago
I wrote a blog post about this:
Basically, if you can't use your SQL query as a subquery then you can't use it as a source in DirectQuery mode. The only workaround I'm aware of is this: https://prologika.com/power-bi-directquery-with-parameterized-stored-procedure/
You can use a table valued function as a source in DirectQuery mode though: https://blog.crossjoin.co.uk/2022/02/20/tsql-table-valued-functions-and-dynamic-m-parameters-in-power-bi-directquery/
Anonymous
2 years agoNot applicable
Excellent solution! I have tried many approaches and almost given up. Today I finally managed to finish my PowerBI views. It really made my day! 🙂
foodd
2 years agoCommunity Champion
Nothing like getting the solution from the one and only source 🙂 Sign up for his Blog update if you have not already.