Forum Discussion
Can i call Stored Procedure with Direct Query?
I had a DirectQuery connection set up that was running a SELECT query - our organisation disabled SELECTs and so we needed to change all of our datasources to Stored Procedures.
When I changed the query from a SELECT to an EXEC <stored proc> - it gave me this error:
"This step results in a query that is not supported in DirectQuery mode." - with an option to Switch All Tables to Import Mode
You will need to switch over to import - the SQL editor in Power BI looks to wrap statements in a "SELECT * FROM".
If you can't SELECT fromt the database and need data real time then I suggest (like you're doing) use of stored proc's + Refresh Now API (https://powerbi.microsoft.com/en-us/blog/power-bi-developer-community-february-march-update/#unlimited-refresh)
Hope that helps.