6 Replies Latest reply: Mar 31, 2014 10:22 AM by Gysbert Wassenaar

count if expressions match

I'm not sure if I'm just missing something.

I trying to count , in this case the number of suppliers when two expressions match. Basically if the supplier scores 100% I would like to count him and in the end I'll see howmany suppliers score 100% out of a total,

appreciate the help

count(
{<
=
count({<Logische_Controle_TXT={'GOED'}>}DISTINCT Child_id)
=
count(DISTINCT Child_id)
>}
[leve-ki]

• Re: count if expressions match

I think the only way is

Count(if(count({<Logische_Controle_TXT={'GOED'}>}DISTINCT Child_id)  = count(DISTINCT Child_id), [leve-ki], 0)

hope it helps

• Re: count if expressions match

Unfortunateky thi does not work.

any other sugestions?

• Re: count if expressions match

and this?

if(count({<Logische_Controle_TXT={'GOED'}>}DISTINCT Child_id)  = count(DISTINCT Child_id), Count([leve-ki]), 0)

• Re: count if expressions match

Perhaps like this:
count({<[leve-ki]={"=count({<Logische_Controle_TXT={'GOED'}>}DISTINCT Child_id)=count(DISTINCT Child_id)"}>}[leve-ki])

• Re: count if expressions match

count({<[leve-ki]={"=count({<Logische_Controle_TXT={'GOED'}>}DISTINCT Child_id)=count(DISTINCT Child_id)"}>}DISTINCT [leve-ki])

Thanks!

Could you explain why you add the part [leve-ki]= in front of the set analysis

• Re: count if expressions match

You always have to have a field name on the left side of the = sign. It means "I want to restrict the set to those values of leve-ki where count(...foo...) equals count(...bar...)"