- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @soumyendunew,
Does that make sense? If so , kindly mark the answer as a solution to close the case, thanks in advance.
Regards,
Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
08-09-2024 07:15 AM | |||
03-15-2024 07:04 PM | |||
09-04-2023 06:17 AM | |||
Anonymous
| 03-27-2024 03:58 AM | ||
10-18-2023 02:59 AM |
User | Count |
---|---|
121 | |
79 | |
47 | |
45 | |
36 |
User | Count |
---|---|
179 | |
89 | |
69 | |
47 | |
47 |