Group multiple parameter values into one

33 Views Asked by At

I am working on SSRS, I have CustomerGroupparam parameter. I has the following records.

The column has the following records

CustomerGroup

1 bin, N Bin, S Bin, 2 group, N group, J Group, 1 item, 2 item, 3 item

the requirement is to create the filter when the user selects Bin its should show all items in Bin records. On the filter box should shows only Bin, Group and Items

The requirement is to create the filter when the user selects Bin its should show all items in Bin records. On the filter box should shows only Bin, Group and Items

enter image description here

1

There are 1 best solutions below

0
Hannover Fist On

Create a parameter for the groups with the group values - Bin, Group, and Item.

Then add a filter to the query using LIKE with a wildcard before the Group.

WHERE UPPER(CustomerGroup) LIKE '%' + UPPER(@GROUP)

I used UPPER in case the db is case sensitive and the data really has mixed cases for the group names.