Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Indirect set analysis(?)


Hi

I want to combine two set expression to know how many people in the first expression that also exist in the second expression.

The goal is to know how many people that have attended the ML*-course (kurskod) that also have taken the course SV but with the grade F or -

count({<Klass = {"Avg*"}, KURSKOD = {"ML*"} >}  PERSONID )

count({<Klass = {"Avg*"}, KURSKOD = {'SV'}, Betyg -= {'F', '-'} >}  PERSONID )

 

1 Solution

Accepted Solutions
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Would this work?

count({<PERSONID = P({<Klass = {"Avg*"}, KURSKOD = {"ML*"} >} PERSONID ), KURSKOD = {'SV'}, Betyg -= {'F', '-'} >}  PERSONID )

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try This:

count({<Klass = {'Avg*'}, KURSKOD = {'ML*','SV'}, Betyg = {'F', '-'} >}  PERSONID )

Let me know

Not applicable
Author

I will test but it looks like that would give the students with F / - in both ML and SV. In ML the grade dosn't matter

Skickat från min Samsung Mobil

Alessandro Saccone <qcwebmaster@qlikview.com> skrev:

Qlik Community<http://community.qlik.com/>

Indirect set analysis(?)

reply from Alessandro Saccone<http://community.qlik.com/people/Alexandros17?et=watches.email.thread> in New to QlikView - View the full discussion<http://community.qlik.com/message/562077?et=watches.email.thread#562077>

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This is an intersection of the two set expressions:

count({<Klass = {"Avg*"}, KURSKOD = {"ML*"}> * <Klass = {"Avg*"}, KURSKOD = {'SV'}, Betyg = {'F', '-'}>} PERSONID)

This assumes that the '-' for BetygF is not a null. You may need a distinct in front of PERSONID to get the correct count.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Would this work?

count({<PERSONID = P({<Klass = {"Avg*"}, KURSKOD = {"ML*"} >} PERSONID ), KURSKOD = {'SV'}, Betyg -= {'F', '-'} >}  PERSONID )

Not applicable
Author

THanks. That solved it!