« Data Filtering : Standard Filter | Main | Datasources : Spreadsheets »

October 14, 2004

Data Filtering : Advanced Filter

The OOo Calc Advanced Filter is similar in functionality to the AutoFilter wherein lists are filtered according to a combination of multiple criteria.

What is different is the mechanism by which we define these criteria.

Sometimes, the Autofilter does not meet the requirements due to the limited number of criteria that can be applied. With Advanced Filter, the criteria are defined in the spreadsheet. This is illustrated below in cells B2:D4 The criteria matrix normally has the same colums and headers as the main database. Each row of the criteria matrix corresponds to a conditon to be applied to the database when filtering. Criteria in the same row are ANDed, while criteria in different rows are ORed

In the example below, we have configured the criteria to select rows whose Year is 2000 AND whose sales exceeds $5,000. We have yet to apply these criteria to the database.

advancedfilter1.jpg

The Advanced Filter dialog is opened with Data-FIlter-Advanced Filter - after selecting the database cells we wish to filter and having created our criteria matrix (see above)

advancedfilter2.jpg


In the Advanced Filter dialog, we just need to identify the criteria matrix and then press OK

advancedfilter3.jpg


The filtered data is shown below.

advancedfilter4.jpg


Finally, we see an example where the same original data is filtered with a different criteria matrix. Here, with the conditions on different rows, they are ORed.

advancedfilter5.jpg

Posted by Dave at October 14, 2004 05:59 AM

Comments

In MS Office Excel filters you can use the term "contains" to find a string anywhere in a field.

for example:

"the dog house", "house your dog", "kitchen house wear".

If you use the Contains filter it will find "house" in any position.

Can we do this is OpenOffice? It is great for searching across text fields.

Hope you can advise me!

David

Posted by: David Landin at February 12, 2006 10:32 AM

Post a comment




Remember Me?