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: 
Not applicable

Re : max date based on a field

Hi all

I have a requirement as follows

my data is regarding the exams done on different courses.

same student can write more than 1 exam.

now i have to take the count of students which has been passed in each exam.

if a student attends more than 1 exam then he should be counted on the latest exam based on the exam date.

how can it be achieved?

13 Replies
tresesco
MVP
MVP

Could you post a sample qvw with sample data? It seems, FirstSortedValue() would be useful here.

Not applicable
Author

please find the attached.

tresesco
MVP
MVP

Is there any possibility that an employee attempted an exam and passed, but still he/she can attempt again for the same exam, and in that case if he/she fails (in the latest attempt) he/she should be considered as FAILED?

rohit214
Creator III
Creator III

Hi Reena,

Either you can write script in back end Like

Main:

Load

*

From XYZ.xls;

Load

Employee Code,

Max(Exam Date)    As Exam Date_MAX,

Resident Main group by Employee Code;

or

you can use expression in front end

=count( {<Employee Code={"$(=FirstsortedValue(Exam Date,Employee Code))"},Exam Result={'Pass'}>}Employee Code)

Not applicable
Author

no,the same exam he/she wont be attending again.there is no such chances..

Not applicable
Author

Thank yu...

i ll try this.. but how can i get the latest exam based on exam date??

tresesco
MVP
MVP

Like attached qvw?

rohit214
Creator III
Creator III

same expression

-firstsortedvalue(Exam,Examdate)

anbu1984
Master III
Master III

=Count(If(Aggr(FirstSortedValue([Exam Result],-[Exam Date]),[Employee Code])='Pass',1))