COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: gosoccer on 02 Sep 2016 10:15:07 AM

Title: Getting all Rows but Only the Latest Ones
Post by: gosoccer on 02 Sep 2016 10:15:07 AM
Hi,
In a subject query filter, I have to add the filter to get of data like below and I need to get only the latest rows based on the update date.

DATA

CASE ID     LAST SYSTEM UPDATE 
1111          09/09/2016
1111          08/09/2015
1222          09/09/2016
1222          07/09/2015

So trying to get the following row in the Subject Query:
RESULT
1111          09/09/2016
1222          09/09/2016

Could you please help!

Thanks so much for your time.
Title: Re: Getting all Rows but Only the Latest Ones
Post by: gosoccer on 02 Sep 2016 10:56:11 AM
Ok, I'm using the following,

QuoteLAST SYSTEM UPDATE  = maximum(LAST SYSTEM UPDATE  for CASE ID )

What do you think? This should give me all the records but only the most up-to-date ones based on
CASE ID. Right?

Thx

Title: Re: Getting all Rows but Only the Latest Ones
Post by: AnalyticsWithJay on 02 Sep 2016 01:51:10 PM
Quote from: gosoccer on 02 Sep 2016 10:56:11 AM
Ok, I'm using the following,

What do you think? This should give me all the records but only the most up-to-date ones based on
CASE ID. Right?

Thx

Correct  :)
Title: Re: Getting all Rows but Only the Latest Ones
Post by: gosoccer on 02 Sep 2016 01:55:09 PM
Thanks for confirming. Works great!