Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
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
MVP
MVP

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

Not applicable

please find the attached.

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?

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

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

Not applicable

Thank yu...

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

MVP
MVP

Like attached qvw?

Creator III
Creator III

same expression

-firstsortedvalue(Exam,Examdate)

Master III
Master III

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