Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

multiple filters in expression

Hi  Expert,

=Count({$<Product={"= not isnull(Prod_Cat1)"}>} DISTINCT Product)

how to have multiple columns filters in the expression of the count of rows

i.e. i want count on multiple Prod_cat1,2,3

=Count({$<Product={"= not isnull(Prod_Cat1,Prod_Cat1,Prod_Cat1)"}>} DISTINCT Product) but not working

thanks

4 Replies
luismadriz
Specialist
Specialist

Hi,


Not sure I understand but this should just give you the number 3 unless null as you're specifying what to count with distinct.


=Count(Distinct {<Product={Prod_Cat1,Prod_Cat2,Prod_Cat3}>} Product)


Unless you want a Product Category instead of Product?


Is possible please post data, screenshots, etc. and you'll see you'll get plenty of replies,


Cheers,


Luis

mdmukramali
Specialist III
Specialist III

Hi,

Small Adjustment in Luis Expression:

=Count(Distinct {<Product={'Prod_Cat1','Prod_Cat2','Prod_Cat3'}>} Product)

luismadriz
Specialist
Specialist

Cheers! although no need for the quotes if the word has no spaces.

If instead of the underscore we had a space then the quotes would've been required.

Cheers,

Luis

sunny_talwar

Or this

=Count({$<Product={"=not (IsNull(Prod_Cat1) or IsNull(Prod_Cat2) or IsNull(Prod_Cat3))"}>} DISTINCT Product)

or this

=Count({$<Product={"=not (IsNull(Prod_Cat1) and IsNull(Prod_Cat2) and IsNull(Prod_Cat3))"}>} DISTINCT Product)