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
Maria_Buzaglo
Helper I
Helper I

Filter connection string using parameter containing a value from querystring

Hi,

 

How can I connect to an SQL Server database and, in the Advanced Options SQL Statement, filter the connection string with a parameter. 

I mean something in the advanced option like:

 

"select * from product where product_name = xxxxxx"

 

And this xxxxxx is a parameter that cames from a querystring.

 

So, according with the value of the parameter, the connection between the Power BI and SQL will just get the data filtered by that parameter. And this will be automatically and dynamic (everytime parameter automatically change, the data that cames from the connection also change).

 

Is it possible? If it is possible, how can I do it?

 

Thanks,

Maria Buzaglo

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @Maria_Buzaglo

 

You can edit in the advanced options to filter with parameters:

v-xulin-mstf_0-1615948210388.png

You can try use LEFT JOIN to meet your need, you need two tables in SQL to filter parameters.

SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name = table2.column_name;

You can refer this.

 

Best Regards,

Link

 

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-xulin-mstf
Community Support
Community Support

Hi @Maria_Buzaglo

 

You can edit in the advanced options to filter with parameters:

v-xulin-mstf_0-1615948210388.png

You can try use LEFT JOIN to meet your need, you need two tables in SQL to filter parameters.

SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name = table2.column_name;

You can refer this.

 

Best Regards,

Link

 

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.