Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

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


talk is cheap, supply exceeds demand
6 Replies

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

Not applicable

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


talk is cheap, supply exceeds demand
Not applicable

Re: count if expressions match

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

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


talk is cheap, supply exceeds demand
Community Browser