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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
soumyendunew
New Member

Passing Multiple Parameters in Power Query

I have a query related to parameter; need to execute SQL Stored procedure

EXEC proc_StockSummary 1,'5',

How can I implement multiple parameter instead of hardcoded 1 and '5' in Power Query

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

Hi @soumyendunew,

 

Based on my test, we can take the following steps to meet your requirement.

 

1. Import the table from desktop, in the SQL statement, here I entered the code as below.

 

        EXEC proc_StockSummary 1, '5'

2. Create two parameters in power query

123.png

 

3.Then we can change the code in the advanced editor and get the result we need. And here is the code for your reference.

 

let
    Source = Sql.Database("localhost", "Power_BI_Test", [Query="EXEC proc_StockSummary '"& Number.ToText(P1) & "' ,  '"& P2 & "'"])
in
    Source

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @soumyendunew,

 

Based on my test, we can take the following steps to meet your requirement.

 

1. Import the table from desktop, in the SQL statement, here I entered the code as below.

 

        EXEC proc_StockSummary 1, '5'

2. Create two parameters in power query

123.png

 

3.Then we can change the code in the advanced editor and get the result we need. And here is the code for your reference.

 

let
    Source = Sql.Database("localhost", "Power_BI_Test", [Query="EXEC proc_StockSummary '"& Number.ToText(P1) & "' ,  '"& P2 & "'"])
in
    Source

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @soumyendunew,

 

Does that make sense? If so , kindly mark the answer as a solution to close the case, thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.

Users online (3,331)