Forum Discussion
Redshift Native SQL is not supporting to pass the multiselect parameters in report builder
- 1 year ago
Hi Koritala ,
As per this document not all data sources support parametersSource: Report parameters in Power BI Report Builder - Power BI | Microsoft Learn
If you still feel the issue is important and not related to source. Please consider reaching out to Microsoft Support. You can provide them with all the troubleshooting steps you've already taken, which will help them understand the issue better and provide a resolution. They might be able to identify something specific about your admin account setup or provide a solution that isn't immediately obvious.
Below is the link to create Microsoft Support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you
Hi Koritala,
I am assuming regionparameter as a text parameter that is a comma-separated string of values ('East','West','North'). regionparameter is a multi-value parameter, and SQL doesn't directly accept it in the IN clause via @parameter syntax.
Can you try with below updated SQL code. Let me know if you have any questions.
select * from sales
where region in (
select trim(value)
from regexp_split_to_table(@regionparameter, ',') as value
)
and sales_date >= @startdateparameter and sales_date <= @enddateparameter
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi Ajay,
Can you please share the SQL code where I need to pass the product and caegory parameters along with region parameter.
Thanks,
Srinivas.
- ajaybabuinturi1 year agoSuper User
Hi Koritala,
Try with below code
select * from sales where region in (select trim(value) from regexp_split_to_table(@regionparameter, ',') as value) and product in (select trim(value) from regexp_split_to_table(@productparameter, ',') as value) and caegory in (select trim(value) from regexp_split_to_table(@categoryparameter, ',') as value) and sales_date >= @startdateparameter and sales_date <= @enddateparameterThanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.- Koritala1 year agoPost Patron
Hi Ajay, I tried your code, but unfortunately, it did not work. For everyone reference, here I am attaching the screenshots.. please advise anything I missed. I have tried to pass a single selection in my slicer in report bilder as per screenshot.
- v-nmadadi-msft1 year agoCommunity Support
Hi Koritala ,
As a troubleshooting step,
Please check if the parameter is configured correctly in report server itself, test it out by running on the report directly.
Additionally to check if the issue is related to the particular parameter or the syntax of the code, please run some other simple SQL code with the same parameter and test it out.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you