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

Combination analysis

Hello,

I was wondering if someone could help. I have data on students and the courses they take; two columns, one is student ID, the other is subject name - please see sample data attached (in reality it's 900 rows). As each student takes 2 to 4 courses, the student IDs are repeated on several lines. I want to find out what the most popular combinations of subjects are, i.e. how many students take each combination. I want to compare all the courses that the students take, i.e. if someone takes 4 course, consider all of them: student taking English and maths only would NOT be grouped together with a student taking English, maths and history.

I'd greatly appreciate some insight on how to deal with this in QlikView.

Many thanks,

Marketa

1 Solution

Accepted Solutions
Agis-Kalogiannis
Employee
Employee

Here it is. 🙂

The left join messed up the counters. So we have two options there...

1. Don't join the tables

2. Create a separate counter table

I just removed the left join.

Thanks

ALK

View solution in original post

5 Replies
Agis-Kalogiannis
Employee
Employee

Hi Marketa

Here is an example.

Can you please let me know if this is what you need?

Thanks

ALK

Kushal_Chawda

See the attached

Not applicable
Author

Thank you both very much for you help. Neither option is exactly what I needed, but ALK's is nearly there.The only thing that needs to be changed there is to get the number of DISTINCT students for each combinations to get the following:

  

English, History, Maths2
English, History, Sociology, Psychology1
English, Maths, History1
Business, Maths1
Business, Maths, Further Maths, English1
English, Maths1

Could you please help me adjust that accordingly?

Many thanks,

Marketa

Agis-Kalogiannis
Employee
Employee

Here it is. 🙂

The left join messed up the counters. So we have two options there...

1. Don't join the tables

2. Create a separate counter table

I just removed the left join.

Thanks

ALK

Not applicable
Author

Wonderful, thank you!