COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gp4570 on 10 Aug 2010 11:56:12 AM

Title: Minimum Date Function
Post by: gp4570 on 10 Aug 2010 11:56:12 AM
I am running a simple report pulling educational data for employees.  An employee can have multiple education records if they have multiple degree i.e. -  Bachelors, Masters, PhD etc... There are also some instances where a employee has multiple degrees at one level i.e. - 2 Bachelor Degrees or 2 Masters Degrees or 2 PhD Degrees etc..

I also use a field called Degree Date Earned which is the date the employee actually earned the degree.  I need to create or use an existing function/filter the will allow me to get the minimum degree date earned for an employee who has multiple degrees at one level.  For Example:

BS Computer Science 5/15/10
BS Electrical Engineering 1/23/07

The filter/function should only pull the degree in Electrical Engineering since it was earned first i.e. - Minimum/Lowest Degree Earned Date for Bachelors.

Any advice or help would be appreciated...

Thanks -- Todd
Title: Re: Minimum Date Function
Post by: Lynn on 10 Aug 2010 12:15:57 PM
Try using the rank function and then filter for rank 1

Create a query item called rankDate such as:
rank(degreeDate ASC for Employee, degreeType)

Then filter for rankDate = 1

Not sure I got the syntax etc. exactly right so play around with it.