Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Sameer9585
Creator II
Creator II

Partial Separation

Hi,

I have a question to acquire the separation of the students who are passed,failed and partially failed.

Means if suppose there are three students A,B,C and there are 2 subjects and if A passed in all subjects he should be shown in passed and if B is failed in all subjects he should be shown in Failed and if C failed in one subject and passed in other then partial failed.

I need to achieve this help me

Thanks and regards

2 Solutions

Accepted Solutions
Vegar
MVP
MVP

Lets use this scenario where result 1 and 0 is failing, 2 and above is passing.

 

LOAD * inline [
Name, Subject, Result
Vegar, Swedish, 3
Vegar, Norwegian, 5
Vegar, German, 2
Vegar, Bangli, 1
Sameer, Swedish, 4
Sameer, Norwegian,2
Sameer, English, 5
Sameer, Icelandic, 2
John, Swedish, 1
John, German, 1
John, English, 1
John, Icelandic, 1
];

 

Summary

Vegar is failing one subject

Sameer is passing all subjects

John is failing all subjects

 

To calculate students who pass use:

=count({<Name=E({<Result={"<=1"}>})>}distinct Name)

 

To calculate students who fails use:

=count({<Name=E({<Result={">1"}>})>}distinct Name)

 

To calculate studends who is partly failing use

=count({<Name=P({<Result={"<=1"}>})*P({<Result={">1"}>})>}distinct Name)

 

image.png

View solution in original post

sunny_talwar

24 Replies
Vegar
MVP
MVP

This expression could work. Assuming the field conaining Passed or Failed is named Status.

=If(match(only(Status), 'Passed', 'Failed'), Only(Status), 'Partly failed')

 

I order for this to work you should have students as a dimension in your diagram

Sameer9585
Creator II
Creator II
Author

Hi vegar, Thanks for your reply but how to separate partially failed one in
a separate table and there is only result(number) no kind of status.Please
help me in that
Vegar
MVP
MVP

Lets use this scenario where result 1 and 0 is failing, 2 and above is passing.

 

LOAD * inline [
Name, Subject, Result
Vegar, Swedish, 3
Vegar, Norwegian, 5
Vegar, German, 2
Vegar, Bangli, 1
Sameer, Swedish, 4
Sameer, Norwegian,2
Sameer, English, 5
Sameer, Icelandic, 2
John, Swedish, 1
John, German, 1
John, English, 1
John, Icelandic, 1
];

 

Summary

Vegar is failing one subject

Sameer is passing all subjects

John is failing all subjects

 

To calculate students who pass use:

=count({<Name=E({<Result={"<=1"}>})>}distinct Name)

 

To calculate students who fails use:

=count({<Name=E({<Result={">1"}>})>}distinct Name)

 

To calculate studends who is partly failing use

=count({<Name=P({<Result={"<=1"}>})*P({<Result={">1"}>})>}distinct Name)

 

image.png

Sameer9585
Creator II
Creator II
Author

Hi Vegar, Thanks for your reply but P and E are not possible in Qlik Sense.
Vegar
MVP
MVP

You are mistaking. Both P() and E() are available for have in Qlik Sense.
https://help.qlik.com/en-US/sense/June2019/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalys...

Skaffa Outlook för Android
Sameer9585
Creator II
Creator II
Author

Hi @Vegar ,

 

Sorry for late reply.The expression you have given is working fine but I need to Show the name in a pivot table who are partially failed  with subject and marks.

Please help me in achieving this.

With Regards,

Sameer9585
Creator II
Creator II
Author

Hi @Vegar ,

Thanks for the help but there was an other situation where the result is calculated in the front end how to do in that case.

Please Help

 

Regards,

Vegar
MVP
MVP

It would help if you could provide a sample inline script (and/or application) similar to the one I created earlier in this thread.

Sameer9585
Creator II
Creator II
Author

Hi @Vegar ,

 

Below is the Inline Table

 

maarks:
LOAD * inline [
Name, Subject, Total,Invalid
Sachin, E, 3,0
Sachin, M, 5,4
Sachin, P, 2,0
Sachin, C, 1,0
Sameer, E, 4,0
Sameer, M,2,0
Sameer, P, 5,0
Sameer, C, 2,1
Margi, E, 1,0
Margi, M, 1,0
Margi, P, 1,0
Ankush, M, 2,1
Ankush, P, 1,0
Ankush, C, 1,0
];

 

So,I'm doing a calculation like (Total-Invalid)/Total and use it as a comparison for the calculation of pass ,fail and partial fail.

regards,