If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Group By Last in Report Studio Query

Started by que1983, 07 Jul 2017 01:58:30 PM

Previous topic - Next topic

que1983

Sample Data
Loan#            Event_Code           Date
1111               100                     6/1/15
1111               100                     6/2/15
1111               141                     6/19/17
1111               152                     6/21/17      /*keep*/
1112                100                    6/19/17     /*keep*/
1113                100                    6/5/17
1113               112                     7/10/17 /*keep*/
1114               100                     8/1/16  /*keep*/
In my cognos query I need to be able to choose the last instance of the event_code by loan# and the date, while deleting the others.  How can I accomplish this???

New_Guy

Hi,
create data item like below
[maxeventcode] with the expression maximum([event_code] for [loan#],[date])

and add a filter
[event_code] = [maxeventcode]
Good luck
New guy