Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

t_hylander
New Contributor III

count as condition inside set

Hi,

I'd like to sum up customers that have more than 5 orders and lives in Sweden.

Tried to search for a solution but couldnt find how to use Count inside a Count.

This is what i have as of now;

count({$<Country={'SWE'} >} DISTINCT Kundnr)

and I would like to have something like this;

count({$<Country={'SWE'}, Count(ordernr)>=5 >} DISTINCT Kundnr)

Thanks in advance!

Tags (1)
3 Replies
MVP
MVP

Re: count as condition inside set

Maybe like

count({$<Country={'SWE'}, Kundnr = {"=Count(ordernr)>=5"} >} DISTINCT Kundnr)

Highlighted
MVP
MVP

Re: count as condition inside set

Something like:

count({<Country={'SWE'}, Kundnr = {"=Count(ordernr)>=5"}>} DISTINCT Kundnr)

or

count({<Country={'SWE'}>} DISTINCT If(Count(ordernr)>=5, Kundnr))

vishalwaghole
Valued Contributor II

Re: count as condition inside set

Hi,

Try below expression, and also find attached sample qvw, hope this will help you

=If(Count(ordernr)>=5,Count({$<Country={'SWE'}>}Kundnr))

Regards,

Vishal

Community Browser