Filtering data

Filters are an essential tool when analyzing data. They allow you to exclude the data in a table that is not currently relevant and focus analysis on a targeted subset of records.

Excluded data is not displayed in the View tab, or processed by Analytics operations such as extracting. Excluded data is only hidden, not deleted, and it can be displayed at any time by removing the filter. Filters are associated with a specific table in an Analytics project rather than the entire project.

How filters work

A filter is a logical expression that evaluates each record in a table and returns a value of True (T) or False (F) – for example, Invoice_Amount > 1000.00

Data that evaluates to True is included in the filtered table, or in an Analytics operation, and data that evaluates to False is excluded.

You can apply filters from a number of different locations in Analytics, and you can use them in conjunction with one another.

Types of filters

You can create several different types of filters in an Analytics project:

  • Global filters, also called view filters
  • Quick filters
  • Local filters, also called command filters
  • Data filters

Filters can be ad hoc – that is, not permanently saved with a table – or they can be named and saved with a table for later reuse. Named filters can also be saved in a workspace so they can be shared among multiple tables.

Global filters (view filters)

A global filter applies to the view, or views, associated with a table layout, and restricts which records are displayed, or processed. When a global filter is applied, any operations performed on the table are performed on only the records that the filter includes.

A global filter remains active until you remove it, replace it with another global filter, or close the table. You can make a global filter the default filter for a table so that it is automatically applied every time you open the table.

For more information, see Global filters (view filters).

Quick filters

A quick filter is a global filter that is applied by right-clicking in a view and using the Quick Filter option on the context menu. Quick filters are convenient because they allow you to select filter values and criteria with the mouse, rather than specifying them manually, and they automatically populate the Filter text box with valid filter syntax.

Because of the need to select filter values and criteria with the mouse, quick filters have certain limitations. They typically cannot be used to create complex filters with multiple criteria.

For more information, see Quick filtering data in a view.

Local filters (command filters)

A local filter applies to a single execution of a single Analytics command, restricting which records in a table the command processes. When the command completes its processing, the local filter is no longer active.

For more information, see Local filters (command filters).

Data filters

Data filters serve a specific purpose. They provide a method for selectively defining data in data sources that contain more than one record type, such as Print Image (Report) files and Multiple Record Type files. Unlike the other types of filters, they are not intended for general use when analyzing data in Analytics.

For more information, see About data filters.

Ad hoc and named filters

Ad hoc filters

You can apply a global or local filter using the filter syntax alone – for example, Invoice_Amount > 1000.00 – in which case the filter is ad hoc. Ad hoc filters are not permanently saved with a table.

Ad hoc global filters are retained while they appear in the filter history associated with a specific table.

Ad hoc local filters are retained for the duration of a single Analytics operation – although they can be retrieved from the command log, if necessary.

Named filters

You can name and save a global or local filter for subsequent reuse, in which case it is permanently saved with the associated Analytics table. For example, you could name and save the ad hoc filter Invoice_Amount > 1000.00 as “Inv_greater_than_1K”.

When you reapply the filter, you specify the filter name, rather than recreating the syntax, which saves labor. Naming filters also makes it easy to differentiate between a number of saved filters. For example:

  • “Inv_less_than_1K”
  • “Inv_1K_to_5K”
  • “Inv_greater_than_5K”

You can name and save filters when you create them, or at any subsequent point if the ad hoc filter still appears in the filter history. Once a filter is named and saved, it is available to use as a global filter with any view associated with the table, or as a local filter with any operation performed on the table.

For information about how to name and save a filter, or convert an ad hoc filter to a named filter, see Apply a global filter to a view.

Filter history

When you apply a global filter to a table it is saved in the filter history associated with the table. As long as the filter remains in the filter history, it can be reapplied by selecting it from the Filter drop-down list at the top of the view.

Both ad hoc and named global filters are saved in the filter history. Local filters are not saved in the filter history.

Additional filter history details:

Tables, views, and filter history Each table has a separate filter history. Multiple views of the same table share the same filter history.
Persistence of the filter history The filter history persists when you close the table, close the project, or close Analytics.
Sequence of filters in the list The most recently applied filter appears at the top of the Filter drop-down list.
Maximum number of stored filters A maximum of 10 filters are stored. If you exceed the maximum, the oldest filter is removed from the bottom of the list, and the most recent filter is added to the top.
Redundant filters Filters in the filter history are unique. Applying a filter multiple times does not cause redundant filter history entries.
Deleted named filters Deleted named filters are not removed from the filter history but they no longer function.
Clearing the filter history You can clear the entire filter history by right-clicking the Filter text box and selecting Clear History. You cannot selectively remove filters from the filter history. Clearing the filter history does not delete named filters.

Summary of filter retention

The table below summarizes filter retention:

 

Permanently saved with table

Added to filter history

Ad hoc global filter

No

Yes

Ad hoc local filter

No

No

Named global filter

Yes

Yes

Named local filter

Yes

No

Configurable filter options

Two configurable options allow you to control aspects of filter behavior:

Include Filters in Field Lists

Controls whether named filters appear in field lists.

For more information, see Interface options.

Hide Filtered Records

Controls whether filtered records in views are hidden, or displayed but visually de-emphasized.

For more information, see View options.