# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Highlighted
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

## Re: count as condition inside set

Maybe like

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

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))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
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