Filter examples

Learn more about how filters work through different examples.

How filters work in Process, Action Hub, Prescriptive, and What-if

Filters in Process Mining components such as Process, Action Hub, Prescriptive, and What-if (all components other than Analytics) affect cases, which means that they show results that either keep or remove all the events of a case.

You can use filters on the event log and on the object tables. However, if an object table is not joined with the event log, it is not usable in any filter except for Data filters in Analytics.

Example: Process Flow filter

You have the table join presented on the following figure in your data sources:

joined objects

To learn more about how to join object tables with the event log, see Table joins.

To see how filtering works, let's apply a Process Flow filter where Users.User_Type = “A” :

  1. Open a project.
  2. In Process, click Manage filters > Add filter.
  3. Select a Process flow filter.
  4. In the Select field section, select a field from your data. For the purpose of this example, let's select Users: USER_TYPE.
  5. In the Filter condition field, select Include matched cases.
  6. From the options below, select Processes where the selected attribute value is present.
  7. From the table with fields, select A.

The following figure shows all the correctly selected values: process flow UI values

  1. Click Add > Apply.

Results

  • The Users table gets filtered first. Only User_ID “BOT_ADM_3210” is kept by the filter.
    The following figure presents how this would look in a table format:

Table with the filter results 1

  • The Event log gets filtered according to the join relationship with “Users”. In this scenario, only cases where at least one activity is executed by a user with User_Type “A” are kept. Only cases “O4333_I001” and “O4333_I003” are kept by the filter. The following figure presents how this would look in a table format:

Table with the filter results 2

How filters work in Analytics

All filters in Analytics impact records of tables.

How filters in Analytics impact widgets

All filters in Analytics, by default, affect widgets selected from the 'Eventlog' or 'Case_Stats' tables.

Filters impacting 'Eventlog' and 'Case_Stats' are identified by the suffix “(entire dashboard)” in the filter name. This ensures the consistency of the dashboard’s data.

There are only 2 exceptions where filters do not affect 'Eventlog' or 'Case_Stats' tables:

  • If you use Data filters on an object table that is not joined with the eventlog.
  • If you use Data filters on an object table that is joined with the eventlog, where filter impact is set to “The filter only impacts the widgets where the corresponding table is selected.” (This is not the default selection for object tables joined with eventlog).

These exceptions are identified by the suffix “(single widgets)” in the filter name.

Setting which widgets are affected

You determine the way Data filters affect 'Eventlog' and 'Case_Stats' by selecting the filter impact inside when you create or edit a filter:

  • If you select “The filter impacts the entire dashboard and the related set of cases.”, filters impact the entire dashboard.
  • If you select “The filter only impacts the widgets where the corresponding table is selected”, filters impact single widgets.

If an object table is not joined with the event log, it is only usable in Data filters inside Analytics. In this scenario, the filter impact can only be set to “Single widgets”.

Example: Data filter (entire dashboard)

You have the table join presented in the following figure in your data sources:

table joins for data filter

To see how filtering works in Analytics, let's apply a Data filter where Users.User_Type = “A” on the entire dashboard:

  1. Open a project and go to Analytics.
  2. Click Manage filters > Add filter.
  3. Select Data filter.
  4. In the Select field section, select a field from your data. For the purpose of this example, let's select Users: USER_TYPE.
  5. In the Filter condition field, select Include matched records.
  6. From the table with fields, select A.
  7. In the filter process section, select The filter impacts the entire dashboard and the related set of cases.
  8. Click Add > Apply.

Results

Process Mining widgets are affected in the same way as the Process Flow filter in Example: Process flow filter. This is reflected in the Cases and Events statistics in the upper left corner of the dashboard.

Business intelligence widgets (charts and cards) are affected depending on their query, especially depending on the from clause, as presented in Result 1 below.

Result example 1: number of users by type

If a widget selects from the 'Users' table, it only keeps records where User_Type = “A”.

If a widget is configured in ways shown in the first figure below, you get the results presented in the next figure in the USERS table.

widget configuration Query: SELECT count(*), User_Type FROM Users GROUP BY User_Type
To learn more about from clauses and configuring widget queries, see Configuring widgets.

results in table format

Results before filter: results before filter

Results after filter: results after filter

Result example 2: spent amount by invoice country

If a widget selects from the 'Eventlog' or 'Case_Stats' table, it only considers cases where at least 1 user joins with User_Type = “A”.

If a widget is configured in ways shown in the figure below, you get the results presented in the next figures in the EVENTLOG and INVOICES tables.

widget configuration

Query: Sum(invoice_amount), invoice_country FROM Invoice JOIN KEEPLAST(Eventlog) GROUP BY invoice_country
To learn more about from clauses and configuring widget queries, see Configuring widgets.

EVENTLOG table is impacted by the filter because “entire dashboard” was selected as filter impact, as shown in the following figure:

eventlog table impacted by filter

INVOICES table is impacted according to the join relationship with the eventlog, as shown in the following figure: invoices table impacted by filter

Results before filter: results before filter

Results after filter: Results after filter

Result example 3: not affected

If the widget doesn’t select from 'Eventlog' or 'Case_Stats' table, nor from 'Users' table, it is not affected by this specific filter.

Example: Data filter (single widgets)

You want to create a Data filter where Vendors.Country = “ITA”.

You have the table join presented in the following figure in your data sources:

table joins for data filter

Importantly, in this example the table Vendors is not joined with the Eventlog. This means that the only filter applicable on this table is a Data filter and the filter impact can only be set to “Single widgets” (the filter only impacts the widgets where the corresponding table is selected).

Process Mining widgets are therefore not affected by this filter. Business intelligence widgets (charts and cards) are affected depending on their query, especially on the from clause:

  • If the widget does not select from the 'Vendors' table, it is not affected by this filter
  • If the widget selects from the 'Vendors' table, it only keeps records where Vendors.Country = “ITA”.

Other examples

Example: Data filters outside Analytics

Data filters cannot be created outside Analytics, as all other process mining features must preserve case correlation (a filter can either keep or remove all the events of a case).

However, some Data filters can be applied outside Analytics if they are already a part of a filter template. This is to make it easier for you to apply the same filter templates in different process mining components.

  • Data filters with impact on the entire dashboard can be applied outside Analytics and have the same effect of the corresponding Process Flow filter (where “Keep processes where the selected attribute value is present”). The following figure presents a Data filter: data filter in a template
    And the following figure presents how this filter would be applied outside Analytics by turning into a Process Flow filter: process flow filter in a template

  • Data filters with impact on single widgets cannot be applied outside Analytics. Note that filters on Object tables not joined with the event log can only impact single widgets, so these filters cannot be used outside Analytics.

Example: Performance filters in Analytics - Activities exceeding KPI benchmarks

In Analytics, if when creating a Performance filter you select Activity duration, Activity wait time, or Activity throughput time, you can select the option Activities exceeding KPI benchmarks.

This filter always affects cases: a case is affected by this filter when at least one of its activities exceeds the corresponding KPI threshold (you can configure the KPI threshold in Data & Settings > KPIs).

In Analytics, this filter affects widgets that select from 'Eventlog' or 'Case_Stats' tables by preserving the case correlation. This means that if you have a widget selecting from 'Eventlog', and only 1 activity exceeds the KPI threshold, you might also see other activities in the widget’s results. This is because they are part of the same case of the “exceeding activity”.

However, if when creating an Activity Duration Performance filter you specify a manual threshold for 1 specific activity and you have a widget selecting from Eventlog you will only see that 1 activity in the widget’s results. This is the default behavior of Analytics filters.

Example: Performance Filters in Analytics - Custom metrics grouped by event

Custom metrics Performance filters with dimension “Event” (grouped by event) always affect cases: a case is affected by this filter when at least one of its events matches the filter condition.

In Analytics, it affects widgets selecting from 'Eventlog' or 'Case_Stats' tables by preserving the case correlation. If you have a widget that selects from 'Eventlog', and only 1 event matches the condition, you might also see other events in the widget’s results. This is because they are part of the same case of the matching event.

  • For Process Duration and Custom metrics grouped by CaseID as dimension (i.e. case-level), the result is quite linear. The case is either included or excluded according to the filter condition.
  • For Activity KPIs and Custom metrics grouped by Event as dimension (for example, event-level), the filter includes or excludes a case when at least one of its events matches the condition. See the following examples:
    • Custom metric “X” (grouped by event) > 10: filter every case where X > 10 for at least one of the case’s events.
    • Activity “A” duration > 5 days: filter every case where A occurs and its duration is > 5 days (if reworks of A occur inside the case, the filter is applied if at least one of its occurrences has duration > 5 days).
    • Activities exceeding KPI benchmarks (wait time or throughput time): filter every case where at least one exceeds KPI benchmarks.