In DirectQuery mode, PowerBI automatically wraps your query as follows: select * from ( [your query] ) , and if you try to do this in SSMS with the stored procedure ie
select * from (exec dbo.getData)
You will receive the error message that you see above.
The solution is that you should put the stored procedure call in the OPENQUERY call on your local server ie
select * from OPENQUERY(localServer, 'DatabaseName.dbo.getData')
Prerequisites would be: enabling access to the local server in OPENQUERY with
exec sp_serveroption @server = 'YourServerName' ,@optname = 'DATA ACCESS' ,@optvalue = 'TRUE'
And then make sure you use the three-digit notation in OPENQUERY, since all calls are by default for the master database
source share