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] |
Click on the Column
box.
Then click on the name of the data column for which you want to
filter for specific values.
Click on the Test
box.
Then select the type of test you want to perform:
Equals looks for data records with values that exactly match the Value you specify.
Doesn't Equal looks for data records with values that are not an exact match to the Value you specify.
Greater Than, Greater or Equal, Less Than, and Less or Equal use a dictionary sort to compare each data record's value to the Value you specify. These tests are not available when the Column on this row is Event, Cause, Action Taken, Bypass, or Date/Time.
Contains will check the data record for the Value you specify. If the data record contains this value – with or without additional characters – the data record will pass the filter and be included in your analysis. This test is not available when the Column on this row is Event, Cause, Action Taken, Bypass, or Date/Time.
Doesn't Contain will check the data record for the Value you specify. If the data record does not contain this value – with or without additional characters – the data record will pass the filter and be included in your analysis. This test is not available when the Column on this row is Event, Cause, Action Taken, Bypass, or Date/Time.
Type the value for what you want to filter.
If you are filtering for a partial value, you will probably
want to enter that value here and choose the Contains
or Doesn't Contain
test.
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_ . |
Click the arrow at the end of this box to pick a value.
(When filtering by Part Number, Process, or Date/Time, this
displays a button
instead of an arrow.)
If the Column you selected
is a traceability column, the Show
Existing Data Table Values check box determines which
values are listed for you to choose from:
To display the predefined list of values for this traceability column, clear the Show Existing Data Table Values check box (as shown above) and then click the Value list.
To display all of the values that exist in this column of your database, select the Show Existing Data Table Values check box and then click the Value list. The task of filling the Value list with current entries may be slow if your database is large.
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.
If two filter conditions will test the same Column for Equals or Contains, it is typical to connect them with the "OR" operation.
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."
If two filter conditions will test the same Column for Doesn't Equal, Doesn't Contain, Greater Than, Greater or Equal, Less Than, or Less or Equal, it is typical to connect them with the "AND" operation.
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."
If two filter conditions will test different Columns, it is typical to connect them with the "AND" operation.
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. |
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?
If the machine equals 1400, or if the machine equals 1500 and the shift equals 3, include this data record in the analysis.
If the machine equals 1400 or 1500, and if the shift equals 3, include this data record in the analysis.
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.
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:
Choose a Column that is traceability, Part Number, Process, Event, Cause, or Action Taken.
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:
Click Build Multi Row Filter.
This displays a list of values for this Column:
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).
Select up to 200 values you want to include in your filter,
and then click OK.
GainSeeker will:
Add a filter row for each value you selected, applying the Column and Test you originally chose.
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.
Enclose this set of filter rows in Parentheses, so that they are evaluated separately from other rows in the filter.
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
...
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.
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).
The alphabetical ordering of the filter labels applies regardless of the number of filters you choose to combine.
If you would want the Sort by selection for Shift to be performed before the Sort by selection for Line, you could change the label (name) for the Shift filter so that it alphabetically precedes the Line filter label. For example, you could relabel the Shift filter as "a-Shift" to move it up on the alphabetized list or relabel Line as "z-Line" to move it down on the list. Either action would reorder the manner in which GainSeeker displays the data.
If you select the same Sort by option for two or more filters you combine,no data will be retrieved. If combined filters Line and Shift both have the Sort by option set to Operator, for example, no data will be retrieved.
Using the example above, you could opt to display the sort in ascending order for one filter (Line - sorted by Operator) while displaying the data for another filter (Shift - sorted by Machine) in descending order.
As you configure the filter conditions and the sort order, GainSeeker displays the equivalent SQL (Structured Query Language) WHERE clause that represents your selections.
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.
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:
Use the retrspc commands to retrieve the stored data (including these records that are bypassed from statistics).
Use the statspc.data commands to access the retrieved data, including statspc.data.outlier() which returns the Bypass setting for each data record.
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.