Forum Discussion
Change filter in SQL easily
- Anonymous6 years ago
Yes you can add a parameter, right click somewhere on your query viewer and choose new Parameter:
as Current value you can put 'A00' (without the quotes)
now you can use this parameter in your sql query, something like this:
= Sql.Database(".", "AdventureWorks2016", [Query="select AddressID, City from Person.Address where City = '"& param & "'"]) - 6 years ago
Hi Anonymous ,
It seems that you want to use parameter in power query, right? If so, you could refer to Pass-parameter-to-SQL-Queries-statement-using-Power-BI and power-bi-introduction-working-with-parameters-in-power-bi-desktop-part-4/ for details.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes you can add a parameter, right click somewhere on your query viewer and choose new Parameter:
as Current value you can put 'A00' (without the quotes)
now you can use this parameter in your sql query, something like this:
= Sql.Database(".", "AdventureWorks2016", [Query="select AddressID, City from Person.Address where City = '"& param & "'"])