Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Good evening, I have a problem:
I have thi sql statement
select * from table1 where field1 in (parameter)
The parameter can has two or more value, for example parameter = ('A','B','C')
In the sql oracle I don't have any problem but:
"I must use direct query for import the data, how I can introduce multiple value in parameter?"
I usually use this statement
1 - I create a parameter in power bi desktop
2 - I take the sql statement and use '" ¶meter& "' in the parameter
In particular:
select * from table1 where field1 in ('" &nameParameterPowerBi&"')
You can help me?
Thank you
Best regards
Solved! Go to Solution.
I found a solution.
It is enough to remove the ' in the query sql when I write the sql statement.
So my sql statement with parameter become:
select * from table1 where field in (" ¶menter& ")
and in the parameter in power bi I add 'value','value', so it will become in the direct query when it run
select * from table1 where field in ( 'value','value')
Best regard
@Anonymous , Are you looking for this option
https://community.powerbi.com/t5/Desktop/parameterize-connection/m-p/205900#M90712
I found a solution.
It is enough to remove the ' in the query sql when I write the sql statement.
So my sql statement with parameter become:
select * from table1 where field in (" ¶menter& ")
and in the parameter in power bi I add 'value','value', so it will become in the direct query when it run
select * from table1 where field in ( 'value','value')
Best regard
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |