This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I would like to pass a parameter directly to the sql query. Or is this possible or only in M?
I prefer for further editing the native sql statement.
Thanx for any suggestions!
Hi Arnoh,
As I know, you could achieve this by M query.
You could try to write hard code in query like below “select * from test where name=’a’”, then create a parameter
Then apply this parameter to query , you need to edit query like below
let
Source = Sql.Database("servername", "newsql", [Query="select * from test#(lf)where name ='"&namep&"'"])
in
SourceThe you could change value in parameter and run the query. You could refer to Pass parameter to SQL Queries statement using Power BI for details
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi I understand. But is it possible to use in in the native query?
Hi Arnoh,
As I know, if you use this in native query, I think it("&namep&") might not be recognized by SQL.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 37 | |
| 32 | |
| 25 | |
| 23 |