Setting the contents of a filter

Use the Filter Builder window to set the contents of a filter. At a minimum, a filter must be set up with one row that includes a filter condition (Column, Test, and Value) or a sort (Column and Direction).

You can add more conditions to a filter by adding rows and choosing the Operation that separates them. For a filter with multiple conditions, you can also add parentheses to apply an Operation to a group of filter conditions.

When filtering for traceability values, Part Numbers, Processes, Events, Causes, or Actions taken, you can also select multiple values at once.

 

Contents  [Hide]

 

Setting the Column, Test, and Value

Tip: When using the Contains test, you can specify a Value that contains the underscore ( _ ) wild card for a single character.

For example: to retrieve data for Machine numbers 1000 - 1009, you could choose the Column of Machine, the Test of Contains, and a Value of 100_ .

Adding a Filter Condition and Setting the Operation

To filter for additional criteria, click Add Filter Condition. This will append a new, blank row for which you can set the Column, Test and Value.

Tip: If you want to insert a new filter condition above an existing filter condition:

1. Click anywhere in the existing filter condition.

2. Press and hold the CTRL key.

3. Click Add Filter Condition, and then release the CTRL key.

When you create a filter with more than one filter condition, you should determine which Operation is needed to connect two adjoining filter conditions.

When choosing the Operation, remember that each data record must pass the entire filter.

Example:  Each data record is evaluated with the test "If the machine contains 1400 or the machine contains 1500, include this data record in analysis."

Example:  Each data record is evaluated with the test "If the machine doesn't equal 888 and the machine doesn't equal 999, include this data record in analysis."

Example:  Each data record is evaluated with the test "If the machine contains 1400 and the Shift contains 3, include this data record in analysis."

Note: If you are creating a filter with both AND and OR operations, it is strongly recommended that you use Parentheses to group together the correct filter conditions.

Adding Parentheses

If you are creating a filter with both AND and OR operations, you should use Parentheses to group together the correct filter conditions.

Take for example the following filter:

Which test will be performed on each data record?

It is not completely obvious how data records will be evaluated. And in fact, a filter like the example above will evaluate each data record with the test "If the machine equals 1400, or if the machine equals 1500 and the shift equals 3, include this data record in the analysis."

To be certain about the way that data will be evaluated using this type of filter, use Parentheses to group some criteria together, as in the example below:

With parentheses, it is clear that each data record will be evaluated with the test "If the machine equals 1400 or 1500, and if the shift equals 3, include this data record in the analysis."

To add parentheses, click the arrow in the ( or ) box to select how many parentheses you need.

Selecting multiple values

When you choose a Column that is traceability, Part Number, Process, Event, Cause, or Action Taken, and set the Test to Equals, Contains, Doesn't Equal, or Doesn't Contain, GainSeeker provides an extra tool that makes it easy to specify multiple values for that Column.

For example, you could use this tool to add filter rows for an Operator traceability column that equals "1536 SMITHERS W.", "1723 BERNSTEIN C.", "4645 FALK P.", or "6541 CIARDI J." - without having to manually create these five rows, set the correct Operations between these rows, or surround them by parentheses if there are additional filter rows.

To use this feature:

    1. Choose a Column that is traceability, Part Number, Process, Event, Cause, or Action Taken.

    2. Set the Test you want to use when filtering on this Column - Equals, Contains, Doesn't Equal, or Doesn't Contain.

      This enables the Build Multi Row Filter button:

    3. Click Build Multi Row Filter.

      This displays a list of values for this Column:

    4. If you are filtering a Traceability Column, you can clear the Show existing data table values check box to display the predefined list of values for this traceability column, or select this check box to display all of the values that exist in this column of your database (note - this may be slow if your database is large).

    5. Select up to 200 values you want to include in your filter, and then click OK.

      GainSeeker will:

      1. Add a filter row for each value you selected, applying the Column and Test you originally chose.

      2. Set the Operation between these new filter rows.

        If the Test for this column is Equals or Contains, GainSeeker will set the Operation between these new filter rows to OR.

        If the Test for this column is Doesn't Equal or Doesn't Contain, GainSeeker will set the Operation between these new filter rows to AND.

      3. Enclose this set of filter rows in Parentheses, so that they are evaluated separately from other rows in the filter.

Setting the Sort Order for data records

When GainSeeker retrieves data records, they are typically sorted first by Part Number / Process and then by date/time stamp.

To set a different sort order, choose the Column you want to sort by and the Direction for the sort (Ascending or Descending).

To add another level to the sort, click Add Sort. In the new Then by row, choose the next Column you want to sort by the Direction for this next level of the sort.

Example:  First, data records will be sorted by Shift in ascending order (e.g., Shift 1, then Shift 2, etc.).
Then within each Shift, all of the records reported for that Shift will be sorted by Machine in ascending order (e.g., Machine A, Machine B, etc.)
The sort order of the resulting data will be similar to the following:
     Shift 1 / Machine A
     Shift 1 / Machine B
              ...
     Shift 2 / Machine A
     Shift 2 / Machine B
              ...

Using the "Sort by" option with the "Combine Filters" option

You can apply two or more filters to the same data using the Combine filters feature on the Select Filters window.

When you apply sort options to filters you combine, GainSeeker generates the data by the sort you chose for the filter label that lists first in the alphabetical listing on the Select Filters window. GainSeeker next generates the data by the sort (if applicable) for the next filter you want to combine—the selected filter label that comes next in the alphabet.

Example

For example, you might opt to combine the filters Line and Shift. You also opted to sort the Line filter column by Operator, and the Shift filter column by Machine. The resulting data for this example will first sort by Operator and then by Machine. That is because Line lists before Shift in the alphabet, giving the sort by Line (Operator) precedence over the sort selected for Shift (Machine).

Additional notes

Viewing the SQL statement

As you configure the filter conditions and the sort order, GainSeeker displays the equivalent SQL (Structured Query Language) WHERE clause that represents your selections.

Saving the filter

If your filter and/or sort settings are not complete, a red X is displayed and the status bar indicates one of the boxes that needs to be changed. Also, the boxes that need to be changed are colored pink like the example below (although on some operating systems and/or display configurations, this color may not be very noticeable).

When your filter has enough definition that it can be saved and used, the red X will change to a green check mark. Now you can click OK to save your filter.

Filtering for Bypassed SPC data

SPC Data records with a Bypass setting of Remove from statistics and hide from charts are automatically excluded from all data retrievals, unless you explicitly retrieve these records by using a filter to find subgroups where Bypass is True.

This example, a filter for Bypass = True, will retrieve only these bypassed data records:

If you want to retrieve both bypassed and non-bypassed data, use a filter for data where Bypass = True OR Bypass = False, like the following example:

 

Another Bypass option for an SPC data record - Remove from statistics but show on charts - means that data will be retrieved and displayed on charts and data tables but excluded from most statistical calculations for values like Control Limits and Cpk. If you want to exclude data with this Bypass setting from being retrieved, you must create a Python external data retrieval. One strategy would be to:

    1. Use the retrspc commands to retrieve the stored data (including these records that are bypassed from statistics).

    2. Use the statspc.data commands to access the retrieved data, including statspc.data.outlier() which returns the Bypass setting for each data record.

    3. Loop through the retrieved data having an statspc.data.outlier value of 0 and use the retrspc.external commands to create the set of external data.