Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Magogar
Contributor III
Contributor III

Filter with where and several results of one field

Hi!

I need to filter for several results of a field. I don't know how to write it.

This syntax is not working:

where client in (1,2,3,4,5)

how can i write it?

Thanks!

Labels (1)
2 Solutions

Accepted Solutions
oskartoivonen
Partner - Contributor III
Partner - Contributor III

The closest comparison to T-SQL in (x, y, z...) syntax is to use the Match()-function.

TableName:
LOAD
    Client
FROM
    Table.qvd (qvd)
WHERE
    Match(Client, 1, 2, 3, 4, 5);

View solution in original post

5 Replies
UncleRiotous
Creator
Creator

Try

If(client<=5,client,Null())

You don't actually need the Null() as if you don't include the second comma it will return a null for any false value.

oskartoivonen
Partner - Contributor III
Partner - Contributor III

The closest comparison to T-SQL in (x, y, z...) syntax is to use the Match()-function.

TableName:
LOAD
    Client
FROM
    Table.qvd (qvd)
WHERE
    Match(Client, 1, 2, 3, 4, 5);
Magogar
Contributor III
Contributor III
Author

Thank you, but I need it for text or numbers.

oskartoivonen
Partner - Contributor III
Partner - Contributor III

Match()-function allows for both number and text search. Use single quote to signal to Qlik it's a string.

Match(Client, 1, 2, 3, '4', '5')