Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
I'm working with the Power Query editor right now.
I have a table connected to my database, and I need to apply a parameter in my request to get some values, else I get an error of query (this is ok).
So I've created a text type parameter which help me to get values in my table.
but when this parameter contains an underscore, the request fails, as if the underscore split my parameter.
Is there any way to include the underscore in the parameter to have my good results please ?
Here is 2 examples :
- WORKS : Table.SelectRows(dbo_AnalogHistory, each Text.Contains([TagName], "AAA.BBB.CC"))
- FAILS : Table.SelectRows(dbo_AnalogHistory, each Text.Contains([TagName], AAA_BBB_CC))
Thanks.
Solved! Go to Solution.
Hi @Anonymous and thanks for answering !
Fortunately, I found an other way to get my data, using a direct Query with the parameter in the WHERE clause like this :
Source = Sql.Database("xxx", "yyy", [Query = "SELECT * FROM [Runtime].[dbo].[History] WHERE [Name] like '%"&ParamName&"%'"])
Thanks for trying to help 🙂
Now my other problem which I can't find a solution is this one :
Here is the solution :
Hi @ChainSpart
What kind of database are your trying to connect to?
Can your parameter without any symbol like"A","B" or with other symbols like dot succeed to filter your table?
Will you get any message when you use the parameters with underscore?
If it is possible, you can show me the screenshot about your issue and show me your M code in Advance Editor.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous and thanks for answering !
Fortunately, I found an other way to get my data, using a direct Query with the parameter in the WHERE clause like this :
Source = Sql.Database("xxx", "yyy", [Query = "SELECT * FROM [Runtime].[dbo].[History] WHERE [Name] like '%"&ParamName&"%'"])
Thanks for trying to help 🙂
Now my other problem which I can't find a solution is this one :
Here is the solution :
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |