Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi,
Is it possible to pass the slicer value from power BI as a parameter to a SQL stored procedure ?
Thanks in Advance!
Solved! Go to Solution.
Hi @pperumal
You may try the method introduced in this blog: Chris Webb's BI Blog: TSQL Table-Valued Functions And Dynamic M Parameters In Power BI DirectQuery
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Hi @pperumal
You may try the method introduced in this blog: Chris Webb's BI Blog: TSQL Table-Valued Functions And Dynamic M Parameters In Power BI DirectQuery
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Note the article says "You can only hard-code the values you pass to the function’s parameters at this point...."
That might be useful for parameter values like days of the week or months, but if you're using a slicer for date ranges, names, or anything dynamic this solution isn't really practical.
Hey @pperumal , the feature you are looking for is called dynamic M query parameters for direct query: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters?WT.mc_id=...
Hopefully, this provides what you are looking for.
Regards,
Tom
This could also be the input parameter of the stored procedure!
For example, in the SQL script of the SQL server connector!
Hey @gzsedely ,
I do not think that direct query is supporting calling stored procedures.
Regards,
Tom
Indeed, you are right!
How do i pass the slicer filters as a input parameter to the stored procedure in the Direct Query. Could you please share any blog or notes available.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 29 | |
| 23 | |
| 18 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 51 | |
| 44 | |
| 43 | |
| 39 | |
| 33 |