The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 :
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
28 |
User | Count |
---|---|
105 | |
97 | |
55 | |
48 | |
48 |