简体   繁体   中英

SSRS Multi Value Parameter filtering

I'm having a problem figuring out how best apply a filter on my data.

As a very basic example, my data contains the following columns:

+-----------+------+------+------+------+------+
| REFERENCE | CAT1 | CAT2 | CAT3 | CAT4 | CAT5 |
+-----------+------+------+------+------+------+
| PL-001    |   50 |      |      |   50 |      |
| PL-002    |      |  100 |      |      |      |
| PL-003    |      |      |   25 |   25 |   50 |
+-----------+------+------+------+------+------+

I need the user to be able to filter on a multi-value parameter where the following works:

  • If the user filters on CAT4 the table will show PL-001 and PL-003.
  • If the user filters on CAT4 and CAT2 the data will show PL-001, PL-002 and PL-003.

EDIT BASED ON COMMENT BELOW: My problem is that I need one filter but I have 5 columns. I have tried creating a new column that concatenates the category names applicable and then using a LIKE or CHARINDEX function on the parameter but this doesn't work for selecting multiple values.

You can achieve this two ways, One with having filter in your query(SSRS) itself and other with creating Table/Matrix report and on that table add filter on Top.

Here are two excellent articles which will help you achieve your desired results.

Article 1

Article 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM