Filtering in QPR ProcessAnalyzer: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
(44 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Filters''' define a subset of cases and events in the process analysis model. This subset of data is used for all analysis. Filters consist of a list '''filter rules''', which are applied in the defined order. Cases/events are excluded if there is a single filter rule, that excludes the cases/events (AND type of logic, instead of OR logic).
'''Filters''' define a subset of cases and events in the model, e.g., certain region or time period. Filter consists of a list of filter rules, that are criteria defining which cases/events are included and which are excluded from the resulting dataset. Filters are very powerful feature in QPR ProcessAnalyzer, because any filter can be applied to any analysis and chart.


There are two types of filtering available in QPR ProcessAnalyzer Excel Client: Runtime Selection and Include/Exclude Filters (more information below).
Filter consists of one or several '''filter rules''', which are applied in the defined order starting from the leftmost. The evaluation order matters in some rules, because the rule is evaluated to the eventlog that is the result of the previous rule evaluation. For example, if excluding event types, number of events in cases change, and thus subsequent filter rules may match do different cases.
== Manage Filters ==
The Manage Filters dialog is used for selecting and managing filters in the current model. The following information about the filters is provided:
:* '''Name''': shows the name of the filter.
:* '''Publish Mode''': shows whether the filter is published only to you (Private), everyone (Public), or if the filter is the default filter for the model (Model Default). If you have Administrator rights to the model, you can set any configured Public filter to be the Model Default. This change will then affect all users of the model and the filter previously set as Model Default will become Public.
:* '''Created On''': the date and time on which the filter in question was applied.
:* '''Created By''': the ID of the user who created the filter.
:* '''Bookmarks''': the number of [[Bookmarks in QPR ProcessAnalyzer|bookmarks]] that have been made from the filter.
:* '''Filter Rules''': the number of filter rules the filter has.
:* '''Opens''': the number of times the filter has been opened.
:* '''Last Modified On''': the date and time on which the last modification to the filter was made.
:* '''Last Modified By''': the user who made the last modification to the filter.


To open a filter, select it from the list and click '''OK'''.
Filter excludes a case/event, if there is a single filter rule that excludes the case/event (i.e., there is an AND type of logic between the filter rules). Filtering functionality is described in more detail in the [[Process_Mining_Concepts|concepts section]].


Each time a filter is changed, for example when elements are filtered, the filter is saved to the Manage Filters list.
== Saving filters ==
You can save the set of filter rules that are in the header, so that they can be retrieved easily. Filter are saved to the model that is currently open. Saving is done by hovering the mouse over the filter dropdown menu (without clicking) and choosing '''Save as new filter'''. There must be at least one filter rule available to be able to save the filter. This will prompt a pop-up window where you can name your filter.


To change the '''Name''', '''Description''', '''Filter Rules, '''Sample Size''' or '''Publish Mode''' of a filter, select the filter from the list, click '''Properties''', and modify the properties in the dialog that opens.<br/>
[[File:Savingfilters.png|1100px]]


To delete a filter, select the filter from the list and click '''Delete'''. Note that you cannot delete the Model Default filter but you have to first set another filter as Model Default before you can delete the filter that used to be the Model Default. Also, you cannot delete a filter if there are bookmarks using that filter in benchmark settings.
You can also set the '''Privacy mode''' as follows:
* '''Private''': Filter is available only for you.
* '''Public''': Filter is available for all users that can use the model. The creator and model administrators can change the public filter.
* '''Default Public''': Filter is public and in addition the default filter of the model. The default filter is set active for all users automatically when the model is opened. Only one filter can be the default filter pf the model, and when setting a filter as default, the previous default filter is changed to public.


To create a new filter from the one that is selected, click the '''Create Filter''' button, and select one of the options:
== Turning off filter rules ==
* '''Copy''': will create a copy of the selected filter.
It's possible to turn off (disable) individual filter rules in a filter. When a filter rule is turned off, it's not applied, i.e. it doesn't have any effect on the calculation. The turned off filter rule is still preserved as part of the filter, and it's thus easy to turn the filter rule on again. This way, filter rules can be toggled on and off without removing them.
* '''Negation''': will invert the Event Types Hidden and Cases Hidden selections in the filter.
* '''Union''': when multiple filters are selected, combines the cases from the filters.
* '''Intersection''': when multiple filters are selected, will create a new filter that contains only those events that exist in all of the selected filters.


== Filter Properties ==
[[File:DisabledFilterRules.png|800px]]
In the Filter Properties dialog, you can define the '''Name''' and '''Description''' for the filter, in addition to defining the [[#Filter_Rules|filter rules]], [[#Sample_Size|sample size]] and [[#Publish_Mode|publish mode]].


=== Filter Rules ===  
== Filter actions ==
In the '''Filter Rules''' group box, the following information about each filter rule is shown:
Users with [[Roles_and_Permissions#Roles_and_Their_Permissions|Analyzer]] role for the project can modify and delete saved filters (that are in models located in the project). You can do this by opening the filters list, hovering your mouse over a filter and clicking on the three dots. You have the following actions available:
:* '''Order''': the order in which the rules are applied to the filter.
* '''Properties''': Open filter properties dialog, where the filter name, privacy mode and filter rules can be modified.
:* '''Type''': the filter rule type used.
* '''Duplicate''': Create a copy of this filter.
:* '''Parameters''': the selection that was used to select the filtered objects and the other relevant parameters for the analysis.
* '''Delete''': Delete the filter permanently.
* '''Replace''': Replace the rules of this filter with the currently selected rules in the header.
* '''Export''': Export the rules of this filter to a file (in JSON format).
* '''Import''': Replace the rules of this filter with rules imported from a file (in JSON format).


In addition, the following columns are hidden by default:
== Filter rule types ==
:* '''Analysis''': the name of the analysis that was used to create the filter rule. For example Flowchart Analysis.
When creating a new filter the following filter rule types are available:
:* '''Created By''': the user who created the filter rule.
* '''Cases by Case Attribute''': Select cases having specific case attribute values.
:* '''Created On''': the date and time the filter rule was added.
* '''Cases by Event Attribute''': Select cases having one or several events with specific event attribute values.
:* '''Depth''': the position of the filter rule in the hierarchy if there is a tree structure in use for filter rules (e.g. when creating union or intersection of filters).
* '''Cases with Specific Events''': Select cases having one or several specific types of events.
:* '''Original Filter''': the name of the original filter, i.e. the filter in which the rule was originally created.
* '''Cases Flowing Through''': Select cases having specific flow (i.e., direct transition between specific types of events).
:* '''Original Filter Description''': the description for the filter, i.e. the filter in which the rule was originally created.
* '''First Event in Case''': Select cases starting with specific event.
:* '''Original Filter Id''': the Id of the original filter, i.e. the filter in which the rule was originally created. Note that this value is empty for the filter itself on the Filter Rules list. For example, for a filter named "Filter.1.1", the filter rules are "Filter.1" and "Filter.1.1". The Filter Id is not shown on the Filter Rules list for "Filter.1.1" because it is the filter itself.
* '''Last Event in Case''': Select cases ending to specific event.
:* '''Id''': the filter rule Id. Given to each filter rule inside a filter.
* '''Case IDs''': Select cases with specific case ID's.
* '''Variations''': Select cases belonging the specific variations.
* '''Events by Attribute''': Select events having specific events attribute values. This filter rule type is available only in Snowflake.
* '''Events by Type''': Select events having specific events types.


To unhide a column:
Filter rules can be created for the dashboard (i.e., applied to all charts in the dashboard) by clicking the blue plus button in the header, or to specific charts in the chart settings in the '''Filter''' tab. When running the root causes analysis, the root causes criteria is also selected similar to filter rules.
#Right click a column title and select '''Column Chooser''' from the popup.
#Drag the column to be shown to the desired position.
 
By clicking '''Create Rule''', you can create new case attribute and event attribute filter rules to select only those attributes you want to use for the current filter in analyses. This is useful with, for example, a big model containing a large number of attributes. The visibility will then apply for all the analyses done with Excel Client and with the GetAnalysis command when using scripts. Selecting either '''Visible Case Attributes''' or '''Visible Event Attributes''' from the drop-down list will open a dialog in which you can define these new rules.
 
To define the visibility of case and event attributes of a filter:
#Define whether you want to include or exclude the case or event attributes by selecting the corresponding radio button ('''Include Only''' or '''Exclude'''). That is, whether the selected attributes are the only attributes visible in the new view, or will they be hidden from the view.
#Select from the list which case attributes and event attributes you want to include/exclude. By default, all the attributes available in the model are selected.
#When done, click '''OK'''.
 
To edit the visibility of case and event attributes of a filter, or to view the filter definitions of other types of filters, select the filter rule and then click the '''Filter Rule Properties...''' button.
 
It is possible to create visible attributes filter rules for union and intersection filters but note that negation of a filter does not affect the visible attributes filter rules of that filter.
 
Note also that if a filter has multiple visible attributes filter rules of the same type, then all of them are evaluated according to the order defined in the Order property of the filter rule.
 
=== Case Sample Size ===
'''Sampling''' is used limit the number of cases in a filtered dataset. '''Sample Size''' is defined for a filter. If there are more cases in the filtered dataset than the defined sample size, part of the cases are randomly dropped out so that there are exactly the sample size number of cases in the filtered data. To disable sampling, select the '''All''' radio button. To change the sample size, enter a number into the '''Limit To''' box or use the arrows to decrease or increase the number of cases. Note that the sample is selected randomly every time the filter is calculated, and thus it may contain different cases.
 
When creating new filters based on drilldown operations, case sample size is inherited from the original filter to the new one.
 
When creating new filters by applying Copy, Negation, Union, and Intersection selections to the current filter(s), the case sample size is as follows:
:* '''Copy''': sample size is the same as in the original.
:* '''Negation''': sample size value will be the default size.
:* '''Union''': sample size value will be the default size.
:* '''Intersection''': sample size value will be the default size.
 
===Publish Mode===
You can also define whether to set the filter to be published only to you (Private), everybody (Public), or if the filter is the default filter for the model (Model Default).
 
=== Other Operations in Filter Properties ===
If new events have been imported into a model, you can do recalculation of the filters by clicking the '''Recalculate''' button. Note that this button is enabled only when new events have been added to the model since the filter was last recalculated.
 
Clicking the '''Export...''' button gives you the option of exporting the filter to a '''.pacm''' file or the events to an Excel sheet. Note that when exporting a filter, only visible cases, events and attributes are included in the destination. That is, if the filter has any filter rules, then only cases, events and attributes visible for that filter will be exported.
 
Clicking the '''Save As New Model''' button will save the filtered data as a new model. Only the filtered cases, events and attributes are included to the new model.
 
== Filter History ==
A filter can be accessed also by selecting it from the '''Change''' drop-down menu:
:* '''Restore Default''': restores the filter to the model default state. Note that there can still be filter rules applied to the filter if the filter set as the model default contains those.
:* '''Each filter for the current model''', sorted by time.
:* '''Clear All Filters''': creates a new filter by removing all filters applied by the Include Only and Exclude buttons and runtime selection.
:* '''Clear Event Type Filters''': removes all event type filters added by the Include Only and Exclude buttons and creates a new filter.
:* '''Clear Case Filters''': removes all case filters added by the Include Only and Exclude buttons and creates a new filter.
:* '''Clear Variation Filters''': removes all variation filters and creates a new filter.
:* '''Clear Runtime Selection''': removes the runtime selection and reopens the current analysis.
 
== Runtime Selection ==
A runtime selection is applied when event types, transitions, cases, or attributes are selected and you click on any other analysis button on the ribbon except the Flowchart button. The data on the view that is opened will then be filtered based on what was selected. The runtime selection is not a persistent filter, so it is not added to the Filter History.
 
To remove the runtime selection and reopen the current analysis, click '''Change''' > '''Clear Runtime Selection'''. The runtime selection is removed also when '''Clear All Filters''' is clicked. Opening the Flowchart analysis will also clear the runtime selection.
 
The runtime selection that is in use can be seen next to the analysis name in the currently open analysis. For example, the Variation Analysis shown in the picture below contains cases that have events in the "Sales Order Changed (VA02)", "Outbound Delivery", and "Handling Unit" event types:
 
[[File:RuntimeSelection.png]]
 
== Filter Rule Types ==
Following filter rule types are available:
* '''Include/exclude cases based on case attribute values''': For example, include only those cases where case attribute "Account Manager" is "Patricia White" or "Mary Wilson".
* '''Include/exclude cases having certain event type(s)''': For example, include cases that have event types "Invoice Created" or "Invoice Paid" (either or both).
* '''Include/exclude cases having certain flow(s)''': For example, include cases that have a flow from "Outbound Delivery" to "Handling unit". To match, there must not be other events between those two events.
* '''Include/exclude cases based on case duration''': For example, include cases the case duration is over 50 days. Case duration is the last event timestamp minus the first event timestamp.
* '''Include/exclude cases based on flow duration''': For example, include cases the flow from "Sales Order" to "Outbound Delivery" is over 5 weeks.
* '''Include/exclude cases belonging to certain variation(s) (sequence of events)''': For example, include cases belonging to variation "Sales Order sent" -> "Invoice Created" -> "Invoice Paid".
* '''Include/exclude cases based on case attribute values and time''': For example, include cases where case attribute "Account Manager" is "Patricia White" where case start time is in year 2017.
* '''Include/exclude cases having certain event attribute value(s)''': For example, include cases having event(s) with event attribute "Organization" is "Finance".
* '''Include/exclude cases having certain event attribute value(s) and time''': For example, include cases having event(s) with event attribute "Organization" is "Finance" and case start time is in Q1/2018.
* '''Include/exclude cases having certain part of variation''': For example, include cases where variation starts with "Sales Order sent" -> "Invoice Created" -> "Invoice Paid".
* '''Include/exclude event types''': For example, include event types "Sales Order sent", "Invoice Created" and "Invoice Paid".
 
It depends on the analysis which filter rule types can be added. For example, in Profiling Analysis including/excluding can be made based on case attributes, and in Duration Analysis based on case duration. When a new filter rule type is added, a new filter is created where the new filter rule is added to the filter rules of the previous filter.
 
There are two kinds of filter rules: '''case filter rules''' and '''event type filter rule'''. Case filter rules filter out cases, so the amount of cases may decrease. There is one event type filter rule which filters out events in cases, so the number of cases doesn't decrease but the process flow in individual cases may change as event types are left out. Note that event type filter rules may filter out all events of a case, which results in cases that don't have events at all. It's not possible to show those cases in flowcharts or calculated durations for them.
 
A case has a '''Flow''' between events A and B means that the case has both events A and B and there are no events between them. A case may have the same flow multiple times. '''Flow duration''' is the event B timestamp minus A timestamp. Note also that flows always has a direction: flow from A to B is different than flow from B to A.
 
'''Variation''' means a sequence of events that a case goes through. A case always belongs to a single variation. If another case has different events or they are in different order, the case belongs to a different variation. Duration between events doesn't matter in terms of which variation a case belongs.
 
== Creating Filters in Analyses ==
Using the '''Include Only''' and '''Exclude''' buttons, it is possible to filter the data. Depending on the active view, the buttons do the following:
 
=== Flowchart Analysis with Event Types or Transitions selected ===
*Include Only
: '''Cases''': Creates a new view containing only the cases that go through all the selected event types and transitions.
: '''Event Types''': Creates a new view containing only the event types of the selected event types.
*Exclude
: '''Cases''': Creates a new view excluding the cases that go through the selected event types and transitions.
: '''Event Types''': Creates a new view excluding the event types of the selected event types.
 
=== Flowchart Animation View with Cases Selected ===
 
*Include Only
: '''Cases''': Creates a new view containing only the selected cases.
 
*Exclude
: '''Cases''': Creates a new view excluding the selected cases.
 
=== Duration Analysis with Rows Selected ===
*Include Only
: Creates a new view containing only the cases with the selected duration(s).
*Exclude
: Creates a new view excluding the cases with the selected duration(s).
 
=== Profiling Analysis with Rows Selected ===
*Include Only
: Creates a new view containing only the cases with the selected attribute value(s).
*Exclude
: Creates a new view excluding the cases with the selected attribute value(s).
 
=== Path Analysis with Event Types or Transitions selected ===
*Include Only
: '''Cases''': Creates a new view containing only the cases that go through all the selected event types and transitions.
: '''Event Types''': Creates a new view containing only the event types of the selected event types.
*Exclude
: '''Cases''': Creates a new view excluding the cases that go through the selected event types and transitions.
: '''Event Types''': Creates a new view excluding the event types of the selected event types.
 
=== Case Attribute Influence Analysis with Row(s) or Parts of Row(s) Selected ===
*Include Only
: '''Cases''': Creates a new view containing only the cases that have the particular value for the particular case attribute in the selected row(s) or parts of row(s).
:* If the selected case attribute(s) are the same that were used to open the Influence Analysis, the new filter will contain only the new selected value(s) for the case attribute(s).
:* If the selected case attribute(s) are not the same that were used to open the Influence Analysis, the original case selection that was used when opening the Influence Analysis isn't used.
*Exclude
: '''Cases''': Creates a new view excluding the cases that have the particular value for the particular case attribute in the selected row(s) or parts of row(s).
 
Note: Only one case attribute can be selected for the Include/Exclude filters in the Influence Analysis.
 
=== List of Cases with Rows Selected ===
*Include Only
: Creates a new view containing only the selected case(s).
*Exclude
: Creates a new view excluding the selected case(s).
 
=== List of Variations with Rows Selected ===
*Include Only
: Creates a new view containing only the cases that belong to selected variation(s).
* Exclude
: Creates a new view excluding the cases that belong to selected variation(s).
 
=== List of Event Types with Rows Selected ===
*Include Only
: Creates a new view containing only the event types that are selected.
*Exclude
: Creates a new view excluding the event types that are selected.
 
The filtered view that is created will be available in the Manage Filters dialog.

Revision as of 20:54, 3 June 2022

Filters define a subset of cases and events in the model, e.g., certain region or time period. Filter consists of a list of filter rules, that are criteria defining which cases/events are included and which are excluded from the resulting dataset. Filters are very powerful feature in QPR ProcessAnalyzer, because any filter can be applied to any analysis and chart.

Filter consists of one or several filter rules, which are applied in the defined order starting from the leftmost. The evaluation order matters in some rules, because the rule is evaluated to the eventlog that is the result of the previous rule evaluation. For example, if excluding event types, number of events in cases change, and thus subsequent filter rules may match do different cases.

Filter excludes a case/event, if there is a single filter rule that excludes the case/event (i.e., there is an AND type of logic between the filter rules). Filtering functionality is described in more detail in the concepts section.

Saving filters

You can save the set of filter rules that are in the header, so that they can be retrieved easily. Filter are saved to the model that is currently open. Saving is done by hovering the mouse over the filter dropdown menu (without clicking) and choosing Save as new filter. There must be at least one filter rule available to be able to save the filter. This will prompt a pop-up window where you can name your filter.

Savingfilters.png

You can also set the Privacy mode as follows:

  • Private: Filter is available only for you.
  • Public: Filter is available for all users that can use the model. The creator and model administrators can change the public filter.
  • Default Public: Filter is public and in addition the default filter of the model. The default filter is set active for all users automatically when the model is opened. Only one filter can be the default filter pf the model, and when setting a filter as default, the previous default filter is changed to public.

Turning off filter rules

It's possible to turn off (disable) individual filter rules in a filter. When a filter rule is turned off, it's not applied, i.e. it doesn't have any effect on the calculation. The turned off filter rule is still preserved as part of the filter, and it's thus easy to turn the filter rule on again. This way, filter rules can be toggled on and off without removing them.

DisabledFilterRules.png

Filter actions

Users with Analyzer role for the project can modify and delete saved filters (that are in models located in the project). You can do this by opening the filters list, hovering your mouse over a filter and clicking on the three dots. You have the following actions available:

  • Properties: Open filter properties dialog, where the filter name, privacy mode and filter rules can be modified.
  • Duplicate: Create a copy of this filter.
  • Delete: Delete the filter permanently.
  • Replace: Replace the rules of this filter with the currently selected rules in the header.
  • Export: Export the rules of this filter to a file (in JSON format).
  • Import: Replace the rules of this filter with rules imported from a file (in JSON format).

Filter rule types

When creating a new filter the following filter rule types are available:

  • Cases by Case Attribute: Select cases having specific case attribute values.
  • Cases by Event Attribute: Select cases having one or several events with specific event attribute values.
  • Cases with Specific Events: Select cases having one or several specific types of events.
  • Cases Flowing Through: Select cases having specific flow (i.e., direct transition between specific types of events).
  • First Event in Case: Select cases starting with specific event.
  • Last Event in Case: Select cases ending to specific event.
  • Case IDs: Select cases with specific case ID's.
  • Variations: Select cases belonging the specific variations.
  • Events by Attribute: Select events having specific events attribute values. This filter rule type is available only in Snowflake.
  • Events by Type: Select events having specific events types.

Filter rules can be created for the dashboard (i.e., applied to all charts in the dashboard) by clicking the blue plus button in the header, or to specific charts in the chart settings in the Filter tab. When running the root causes analysis, the root causes criteria is also selected similar to filter rules.