Filtering data
When selecting data from a database in the Select data to load step, in either Add data or the Data load editor, you can select a subset of data in the fields you are loading. This can be useful when you want specific data, such as only sales over $40,000. And it reduces the amount of data loaded.
For information about applying filters in the data manager, see:
You enter a data filter expression by selecting Filter data in the Select data to load step. Selecting Filter data opens a text box where you enter a filter expression. For example:
Sales >= 40000
Filter data selects from individual fields, such as Sales. It operates as an SQL WHERE clause. Most operators and keywords used in WHERE clauses can be used with Filter data. Valid operators include:
- =
- >
- >=
- <
- <=
- IN
- BETWEEN
- LIKE
- IS NULL
- IS NOT NULL
Qlik Sense builds a WHERE clause in the data load script from the expression entered in Filter data.
The keyword AND can be used to combine operators, such as when you want to filter based on more than one field. For example:
Sales < 30000 AND RegionID = 45
You can also use AND to select multiple values from the same field:
Name = 'Smith' AND Name = 'Jones'
The same filter could also be written with the IN operator. The IN operator is less verbose:
Name IN ('Smith', 'Jones')
The OR keyword can also be used. For example:
Name = 'Smith' OR Name = 'Jones'
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!