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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
aignn
Helper II
Helper II

How use parameter in Mysql connector query?

hello!

Tell me please how use parameter in Mysql connector query?

 

I use Mysql connector in Powerbi for get data from Mysql base

 

 

 

= MySQL.Database("mysqlserver1.local", "base", [Query="  select.............................. where queue=1", ReturnSingleDatabase=true])

 

 

I want to create a parameter and substitute different values instead of 1 in the queue

 

Thank you advace

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @aignn ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @aignn ,

 

We can create a parameter called "id_parameter" and use text type, then use it as following formula:

 

= MySQL.Database("localhost", "testdb", [ReturnSingleDatabase=true, Query="select * from testdb.tablename where category_id = " & id_parameter])

 

4.PNG5.PNG

 

Please also refer to this thread about the warning "Permission is required to run this native database query".

https://community.powerbi.com/t5/Desktop/Permission-is-required-to-run-this-native-database-query/td...

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.