Using Filters in Auditing

Filters can be used to select records in a variety of ways that are helpful when auditing. For example, you might create filters to do the following:

Selecting every nth record

Create and apply a filter using the following expression:

   Int(Recno()/10)=Recno()/10

This expression selects a group of records that are evenly distributed across your data set. In our example, we’ll select every tenth record. In the above expression you may substitute any number in place of 10.

This expression uses the Recno function to return the record number of each record in the table. Note that the record number is not the same as the row numbers that appear down the left side of the table. While sorting and other operations may affect each record’s row number, their record numbers remain fixed. This expression relies upon this aspect of record numbers to return a data subset that represents an even distribution of the entire data set.

Selecting the first n records

Create and apply a filter using the following expression:

   Recno()<=10

This expression selects a group of records that all lie together within your data set. This is useful if you need to select a group of records that all relate to the same item, such as a selection of records from one sales territory. In our example, we’ll select the first 10 records. In the above expression you may substitute any number in place of 10.

Selecting a pseudo random group of n records

  1. Create a calculated field using the following expression: RandEx()

  2. Create and apply a Sort Order that sorts by the calculated field. By sorting the table based upon the calculated field’s random values, you effectively scramble the data in the table. Next we’ll use a filter to select the first n records, which yields a randomly selected group of records.

  3. Create a new filter using the following expression: 1=1

    This expression always evaluates to TRUE and therefore selects all records. We’ll use another feature of filters to select the number of records we want. This feature allows you to specify the number of records that the filter should return.

  4. In the Filter Definition dialog select the "First n Rows" radio button (this radio button appears in the Selected Rows group box at the top right corner of the dialog).

  5. Type a number into the associated edit box.

  6. Type a name for the filter in the Filter Name box.

 

© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support