Forum Discussion
How to use Slicer to pass dynamic Parameters to SQL Server stored Procedure
Hello folks,
I have SQL Server as a data source which is set in Import mode. I am calling a stored procedure to get the data in the Power Query. I am using Dynamic M- Query Parameters to pass the respective Parameters to the Stored Procedure. In this stored procedure I am going to pass the table name as my Parameter.
I created another data set that gets all the table names from the SQL server which I am going to present in a Slicer value. My current objective is to pass the selected Slicer value to the first Stored procedure so that I can get all the relevant data from my selected table.
Here I am looking for help on How to bind the selected slicer value to the Stored Procedure in Power Query so that I get the data from the table I needed only.
Thanks in advance!!!
2 Replies
- amitchandak
Super User
Anonymous , Refer if this old blog
https://www.thebiccountant.com/2017/03/22/use-slicers-for-query-parameters-in-powerbi/
- v-janeyg-msft
Community Support
Hi, Anonymous
If you can change the connection mode to direct query,maybe you can try this method according to the doc:
Dynamic M query parameters in Power BI Desktop (preview) - Power BI | Microsoft Docs
Best Regards,
Community Support Team _ Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.