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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MaxMattiello79
New Member

Power Query dynamic pass parameter to a stored procedures

Hello,

I build an Excel file that load some data calling a stored procedures using Power Query and i need to dynamically pass the parameter to that stored procedure.

The Excel file looks like the attached image (see image below) and it contains the following element:

- a query called StudyList that using a SQL statement read a list of project from a SQL database

- a query called PROMAC that execute a stored procedure that has an input parameter that should be one of the project that user select from the StudyList query

Excel1.png

 

The page contains a Pivot Table where the Study Code field from StudyList query is included in the filters section of the Pivot and some fields from PROMAC query are present in teh ROW and VALUES section.

What i would like to implement is to pass to the stored procedure (under PROMAC query) the study selected from the list.

Is that possible? If so how?

I see that i can define a table and use that table as parameter for the stored procedure but the issue if that as i'm using a Pivot i'm not able to define a table name because it is not supported.

 

Excel 2.pngThanks

 

Massimo

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@MaxMattiello79 ,

 

You may take a good look at the following post.

https://community.powerbi.com/t5/Desktop/parameterize-connection/m-p/205900#M90712

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@MaxMattiello79 ,

 

You may take a good look at the following post.

https://community.powerbi.com/t5/Desktop/parameterize-connection/m-p/205900#M90712

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.