Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

rupesh632
Contributor

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
Valued Contributor

Re: multiple filters in expression

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
Valued Contributor II

Re: multiple filters in expression

Hi,

Small Adjustment in Luis Expression:

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

luismadriz
Valued Contributor

Re: multiple filters in expression

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

Re: multiple filters in expression

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)

Community Browser