Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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]



1 Solution

Accepted Solutions
Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

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

Not applicable
Author

Unfortunateky thi does not work.

any other sugestions?

alexandros17
Partner - Champion III
Partner - Champion III

and this?


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

Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
Not applicable
Author

when adding distinct it works

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

Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand