# How to easily set a negative filter

#1

Hi, I was trying to easily filter something out, also in the snippets PQL reference I didn’t find this

is there an easy “Unlike” function, e.g. to filter out specific events (like NOT LIKE?)

#3

Hi Kristin,

I think for now you can not use NOT LIKE ‘%Wort%’. If you want to apply a component filter you can try
`FILTER CASE WHEN "abc"."bcd" LIKE '%Wort%' THEN 0 ELSE 1 END = 1;`

Does that work for you?
Kind regards,
Max

#4

Hi Max,

unfortunately it is not working, we found out that for component filters where your chart or KPI is reflecting a calculated throughput time. We have tried the following: FILTER MATCH_ACTIVITIES(EXCLUDING_ALL[‘Document Blocked’] ) = 1;
all case when did not work whenever we were referring to eventlog.

#5

Hi Kristin,

Can you please let me know if I understand your question right? If I get you right, you have a component in which you calculate the Throughput Time of cases. You now only want to count those cases that don’t run through a specific activity. In your case this activity is ‘Document Blocked’. So in the below cases, you would only want to calculate the Throughput Time of case 1 and 3, correct?

Case1 , Activity1 , 12.1.2019
Case1 , Activity2 , 13.1.2019
Case2 , Activity1 , 12.1.2019
Case2 , Document Blocked , 15.1.2019
Case2 , Activity2 , 16.1.2019
Case3 , Activity2 , 13.1.2019
Case3 , Activity3 , 14.1.2019

Thanks and kind regards,
Max

#6

Hi Max,
exactly - we want to see the throughput time for all cases where this special activity is not included. it was easier to say "were activity like ‘…’ " - thats why I was asking for this “unlike” or “not like” …

#7

Hi Kristin,

You were already very close. In this example you can see how I filtered the cases that should not contain an activity. You can reach this with the component filter in multiple ways.

Example 1:

``````FILTER MATCH_ACTIVITIES("Eventlog"."Activities", EXCLUDING_ALL['Document Blocked']) = 1;
``````

Example 2:

``````FILTER MATCH_ACTIVITIES("Eventlog"."Activities", NODE['Document Blocked']) = 0;
``````

Does that work for you?
Kind regards,
Max

#8

Hi Max - we have tried - it works … thx for the patience and solution!