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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors