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
YehudaE
Frequent Visitor

Power bi reports using parameters to create SQL queries and displaying the results.

Hi,

I have drop down lists from imported SQL data tables to choose parameters in Power bi. I would like to place these parameters in a SQL query to query the tables or send the parameters back to SQL to query results and display the results back in Power bi. How is the parameters transaction made into queries of tables and displaying results in power bi?

9 REPLIES 9
YehudaE
Frequent Visitor

'You must first load data via the Power Query (queries) before an visuals will render in Power BI' - I loaded SQL tables into Power in a slicer format

YehudaE_0-1738790447007.png

and wish that the state picked will be used as a parameter to query another table that was also loaded in power.

.

Anonymous
Not applicable

Hi,

Thanks for the solution ToddChitt  offered, and i want to offer some more information for user to refer to.

hello @YehudaE , based on your descriotion, you can consider to use dynamic paramater in power query, it can be used in power bi desktop so that can affect the query, but it can be used when the connection mode is direct query. You can refer to the following link about it.

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn

And you can refer to the following sample 

Pass Parameters to SQL Queries - Excelguru

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@Anonymous Thanks for those links. I was not aware of this feature, of binding a field to a parameter. Do you know when the introduced that feature? It's so hard to keep up with the changes.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Anonymous
Not applicable

Hi @ToddChitt 

You can refer to the following article.

Unlock the power of dynamic parameter binding for ... - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

ToddChitt
Super User
Super User

Sorry, but this did not help me understand what you are trying to do. Can you show us a picture of what this means:

"I have drop down lists from imported SQL data tables"

What is in this data? Names of tables? Or actual table data?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





 Names of tables? Or actual table data? - actual table data

Anonymous
Not applicable

Hi @YehudaE 

You can refer to the solution i offered above, create a dynamic paramater, then use the paramater in sql query, it can return the related result.

 

Best Regards!

Yolo Zhu

YehudaE
Frequent Visitor

Thanks for your reply. I'll try to make it clearer. '...and THAT' meaning those chosen paramters need to be either be used against the imported data from SQL in Power bi, or run a SQL query in the SQL DB, in both cases display the results in Power bi.

ToddChitt
Super User
Super User

Let em get this straight: You must first load data via the Power Query (queries) before an visuals will render in Power BI report pages. And on those pages you want to have the user be able to select a parameter and THAT changes how the queries behave, that have ALEADY run?

Did I understand that correctly?

Can't be done.

Maybe you can use Parameters in Power Query, where you can inject those values into the individual queries with simple transformation steps like filtering, etc.

 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





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.