Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
tahmid-bari
Frequent Visitor

Create dynamic parameter(s) with values stored in sql server (stored proc)

Hi PBI Team,

 

My dataset is linked using 'import' and a stored procedure in SQL server. I have created dynamic parameters (start date, end date, number) where I can enter values that change the result data in 'edit parameter'. However, I am having trouble (cannot find 'Advanced' option) binding those dynamic parameters to the newly created tables.

 

Furthermore, can I include another stored procedure in the dynamic parameter - number so that the end user can select from a drop-down list? In fact, because the (Dynamic M query parameters) feature does not support RLS, I am attempting to implement row-level security by creating a table in SQL Server and using DAX on the table (dynamic parameter - number).

 

I also understand that creating a dynamic user filter using a security field in the data can be done in Tableau, however, we would prefer to find a solution in the Power BI app. Thank you.

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

2 REPLIES 2
tahmid-bari
Frequent Visitor

Hi Alexis,

Thank you so much for your advise. I apologise for the delay in responding. When I tried to use DirectQuery (exec sp proc), I received the following error message: Incorrect syntax near the keyword 'exec' in Microsoft SQL. Syntax error near ')'. Then I took the following reference from the forum: Thanks.
https://community.powerbi.com/t5/Power-Query/Microsoft-SQL-Incorrect-syntax-near-the-keyword-exec-In...

AlexisOlson
Super User
Super User

Dynamic parameters only work with DirectQuery, that is, not in Import mode.

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.