Forum Discussion
Use SQL Store Procedure in Power BI
anakoom You can't. If you watch what is actually sent to the SQL server you will see that an added syntax is added to the command which invalidates the statement. In Import, it just executes the SQL statement. In Direct Query it changes it to something like Select * from () - this is off the top of my head. In either case, that is why the openquery works, or the table valued function because both of those wouldn't create un-executable code.
I'm giving you an alternative to a SP because that method doesn't work, you can transform whatever you are doing in that SP to the TVP.
Pass parameter value and data will fetch based on given parameter?
- Anonymous9 years agoNot applicable
anakoom Probably not in the way you are thinking...
Power BI is best when you pull in the larger dataset and add slicers and filters to the report.
I'm not aware of any way to pass a parameter all the way downstream from a deployed report in the Power BI Service. You can do this in the desktop, but that would be stuck in that mode from my understanding.
- sekic9 years agoHelper I
Hi,
table value function is just fine, but not work if you call it with parameter which is not constant :(
I tried to send any info about userid, dax expresion about userid, or anything similar which is not constant, didn't successed.
select * from TableFunction('abc') run fine, but
select * from TableFunction(USERPRINCIPALNAME()) fail...