Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
alvinford
Contributor III
Contributor III

How to Get This ....

Hi All,

How to implement the following logic.

I have the following data

StudentCodeStudentIDJoinDateStudentPramotedDateNewStudentID
861357501/08/201001/06/201113772
861377201/06/201101/06/201113805
861380501/06/2011
861393601/07/201201/10/201214054
861405401/10/2012

In the above table for some of the StudentID (Ex 13575)  have NewStudentID (Ex 13772). NewStudentID is also in the list of StudentID (Ex 13722).

My requirement is whenever there is NewStudentID for the StudentID . The NewStudentID JoinDate should be replaced with the OldStudentDate based on StudentPromoDate.

Desired results will be as below.(You can check the JoinDate)

StudentCodeStudentIDJoinDateStudentPramotedDateNewStudentID
861357501/08/201001/06/201113772
861377201/08/201001/06/201113805
861380501/08/2010
861393601/07/201201/10/201214054
861405401/07/2012

Regards,

Alvin.

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use something like this after loading your raw data:

Join(Data)

LOAD StudentCode,

     Date(Min(JoinDate)) As JoinDate2

Resident Data

Group By StudentCode

;

The updated Join Date is in JoinDate2. See the attached.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
alvinford
Contributor III
Contributor III
Author

Hi Jonathan,

Thanks for your reply.

I cant take the Min(JoinDate) as I cannot group it by StudentCode . For the same studentCode the JoinDate has to be affected for different StudentID like 13805 and 14054.

If I take the Min(JoinDate) based on the StudentCode for all records my value will be 01/08/2010.

Regards,

Alvin.

jonathandienst
Partner - Champion III
Partner - Champion III

So the student codes are not distinct for the students?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
alvinford
Contributor III
Contributor III
Author

Hi Jonathan,

The Student Codes are distinct but the values which I want to achieve are based on the StudentID.

Regards,

Alvin.