Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Use OR-mode with multiple filters?

Is it possible to use "OR" logic when making selections in multiple filters?

Explanation:  I want to be able to pull results if Field1 contains A, B or C  OR  if Field2 contains A, B, or C (or D or E or F etc.). 

The fields to filter against could be any of over 40 possible fields and the values to filter for could be anything.

I'm not well versed in variables and while I can write a pretty mean formula, I'm no expert in Qlik expression syntax.

Can anyone help?

Labels (2)
1 Reply
Specialist III
Specialist III

You could look at the P() function if you want to use Set Analysis, but with 40 fields it would be very complex.

=Count({<X=P({<Field1={'A','B','C'}>}X)+P({<Field2={'A','B','C','D','E','F'}>}X)>} X)


In Qlikview, I've used a combination of the P() function and Alternate States to dynamically build the Set Analysis statement based on the user's selection of fields.