How to pass comma separated values in aggregate for filter condition

How to pass comma separated values in aggregate for filter condition

  

Hello,

I have 6 checkboxes in my filter. So if user selects 2 checkboxes, I want to pass 2 comma separated values in aggregate but it seems that aggregate doesn't accept CHARINDEX() function. 

How should I achieve this?

Thanks and Regards,

Suraj Borade

Suraj Borade wrote:

Hello,

I have 6 checkboxes in my filter. So if user selects 2 checkboxes, I want to pass 2 comma separated values in aggregate but it seems that aggregate doesn't accept CHARINDEX() function. 

How should I achieve this?

Thanks and Regards,

Suraj Borade

Hi Suraj,

Unfortunately, there's no equivalent to SQL "IN" in an aggregate. 

But you can use Advance SQL query to achieve this.

In SQL block and pass the comma separated values to it as an input parameter and use this list for filtering the data. Just remember to mark the Expand Inline property of the query parameter to Yes. Refer the image below 


For your reference : 

SELECT * FROM {TableName} WHERE {TableName}.[ProductName] IN (@QueryParameter)


This should do the trick. Let me know if this solves your problem.

--- Regards -----

Amit Verma


Suraj Borade wrote:

Hello,

I have 6 checkboxes in my filter. So if user selects 2 checkboxes, I want to pass 2 comma separated values in aggregate but it seems that aggregate doesn't accept CHARINDEX() function. 

How should I achieve this?

Thanks and Regards,

Suraj Borade


hi Suraj,

Try this..

Need to convert comma seprated values as mention below. 

hope this works


Regards 

Shoeb

Solution

Thanks everybody for the replies.

I am passing my ids in comma separated variable and using function CHARINDEX() in SQL server to get the result.

Solution