Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

count excluded

Hi,

I have a
scenario of counting students who did not take or failed the compulsory course
depending on their major.

We are
using an existing Model, and we cannot modify any part of it. So i need to
figure out how to do this thru set analysis or expression.

In the
example below, i have 4 students major in Accounting, their compulsory course
is ACCT111.

Based on
the class table, student 1,2,4 took ACCT111 but only Student 1 and 2 passed.
and student 3 did not take it at all.

When i
write the expression, the result count would be 2.

Student 3
who did not take the course and student four who failed.

Really
appreacitae your help on this. Many thanks!

Student Master

StudentMajor
Student 1Accounting
Student 2Accounting
Student 3Accounting
Student 4Accounting

Class Table

StudentCourseGrade
Student 1ACCT111A
Student 2ACCT111B
Student 4ACCT111D
1 Solution

Accepted Solutions
PradeepReddy
Specialist II
Specialist II

Try something like this....

Total Students   : Count({$<Major={'Accounting'}>}Student)

Exams Written  :  Count({$<Major={'Accounting'},Grade={'A','B','D'}>}Student)

Exams Passed  :  Count({$<Major={'Accounting'},Grade={'A','B'}>}Student)

Exams Failed    : Count({$<Major={'Accounting'},Grade={'*'}-{'A','B'}>}Student)

View solution in original post

4 Replies
DavidFoster1
Specialist
Specialist

Look at using the E syntax in set analysis

Anonymous
Not applicable
Author


hi,

thanks. can you share the syntax using the sample fields ive given?

  Ive been trying to but couldnt get the result that i need...

  really appreaciate the help. Thanks!

PradeepReddy
Specialist II
Specialist II

Try something like this....

Total Students   : Count({$<Major={'Accounting'}>}Student)

Exams Written  :  Count({$<Major={'Accounting'},Grade={'A','B','D'}>}Student)

Exams Passed  :  Count({$<Major={'Accounting'},Grade={'A','B'}>}Student)

Exams Failed    : Count({$<Major={'Accounting'},Grade={'*'}-{'A','B'}>}Student)

Anonymous
Not applicable
Author

many thanks Pradeep for the tips.. I was able to figure it out using your reply..

many thanks, really appreciate it.. 😃