3 Replies Latest reply: Jan 13, 2016 9:29 AM by vishal waghole

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

• ###### Re: count as condition inside set

Maybe like

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

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

• ###### 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