Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

homersimpson
Contributor III

How to count where field values find in other field values?

Hi,

example:

count( {$<Products = {Handy, PC, Notebook}>} Products )


"Handy, PC, Notebook" are in the field "TopProducts". I want only count Products wich find in TopProducts. In the expression i must write each TopProduct. Is it possible only to write the fieldname TopProducts instead of each value from this field?


count( {$<Products = TopProducts>} Products )


But if no TopProducts value selected it doesn´t work.


How can i do it?


regards,

sam

1 Solution

Accepted Solutions

Re: How to count where field values find in other field values?

May be this:

Count({$<Products = p(TopProducts)>} Products )

4 Replies

Re: How to count where field values find in other field values?

May be this:

Count({$<Products = p(TopProducts)>} Products )

homersimpson
Contributor III

Re: How to count where field values find in other field values?

Perfect, thanks!

homersimpson
Contributor III

Re: How to count where field values find in other field values?

How can i combine fields?

Count({$<Products = p(TopProducts)>} Products )

The field TopProducts are in a table where another field is like TopProductsLand. How can i combine this both fields in this expression. For example

Count({$<Products = p(TopProducts where TopProductsLand = "US")>} Products )

regards,

Sam

Re: How to count where field values find in other field values?

May be like this:

Count({$<Products = p({<TopProductsLand = {'US'}>}TopProducts)>} Products)