Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
brunosantos
Contributor II
Contributor II

Set analysis - Clients with one value but not another

Hello.

I've been trying but until now I haven't been able to get it right.

Also reading the help on Set Analysis ... still confused (newbie on this).

Let's say I have a table of clients and there Languages.

LOAD * INLINE [

CLIENT, LANGUAGE

A, EN

A, DE

A, PT

B, BR

B, PT

B, EN

C, EN

D, DE

];

If I try to find the number of Clients that speak EN.

Set Analysis:

          =Count({1<LANGUAGE={'EN'}>}CLIENT)

I get the value 3 - Which is OK (Clients A, B and C speak EN)

But let's say I want the number of Clients that speak EN, but do not speak DE.

Set Analysis I've been trying:

          =Count({1<LANGUAGE={'EN'}-{'DE'}>}CLIENT)

Here I also get the value 3, which is not OK. I should receive value 2 (Clients B and C speak EN but not DE - Client A speaks both Languages).

I believe this should be fairly simple (I hope), but I not getting there.

Thanks a lot in advance.

Best Regards,

Bruno.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Robert, you forgot something:

=Count({1<LANGUAGE={'EN'},CLIENT=e({1<LANGUAGE={'DE'}>} CLIENT)>}CLIENT)

View solution in original post

7 Replies
Anil_Babu_Samineni

Even, Client A also speaks EN Language. Why don't you need this?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
RSvebeck
Specialist
Specialist

Try this:


Count({1<LANGUAGE={'EN'},


CLIENT=e({1<LANGUAGE={'DE'}> CLIENT)



>}CLIENT



Svebeck Consulting AB
neelamsaroha157
Specialist II
Specialist II

Try this

Count({$<CLIENT=E({1<LANGUAGE={'DE'}>}CLIENT)* P({1<LANGUAGE={'EN'}>})>}CLIENT)

Anonymous
Not applicable

Hi Robert, you forgot something:

=Count({1<LANGUAGE={'EN'},CLIENT=e({1<LANGUAGE={'DE'}>} CLIENT)>}CLIENT)

trdandamudi
Master II
Master II

One of the way is as below:

brunosantos
Contributor II
Contributor II
Author

Problem solved. Thanks for your time and help.

Bruno.

brunosantos
Contributor II
Contributor II
Author

Thanks Robin Hausdörfer and Robert Svebeck for your answers.

Bruno.