How to implement 'Not In' Filter in SSRS?

MJCookie picture MJCookie · Nov 20, 2015 · Viewed 8.8k times · Source

I have a field in SSRS that i need to filter on. For 3 table I can use a IN filter. But I am in need to use a NOT IN operator. The field contains numeric values.

I need to be able to say not in (30,31,32,33,34,35,36,37,38,39)

I cant do it within the dataset either, needs to be a filter.

How should I achieve it ?

Answer

alejandro zuleta picture alejandro zuleta · Nov 20, 2015

You can use an expression to determine which values are going to be filtered.

Go to Tablix properties/ Filters

In expression use:

=IIF(Array.IndexOf(split("30,31,32,33,34,35,36,37,38,39",","),
CStr(Fields!YourField.Value))>-1,"Exclude","Include")

For Operator use:

=

For Value use:

="Include"

Let me know if this can help you