COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: gosoccer on 20 Feb 2018 12:09:48 PM

Title: Getting the record to show only based on the maximum date
Post by: gosoccer on 20 Feb 2018 12:09:48 PM
Hi everyone,
I have a unique situation. I'm creating a List in Cognos Analytics and populating three data elements.

ID       STATUS     DATE
1111       NEW     Dec 15, 2016 2:30 Pm
1111       SOLD    Dec 17, 2016 1:00 Pm

So what I need to show on the list is one entry as
1111       SOLD    Dec 17, 2016 1:00 Pm and not both entries.


Is there a way to use the Filter and MAXIMUM feature to show the data without programming in Framework Model to get only the most up-to-date.

When I drag to the list the three data elements, even after using the below Query Expression, I'm still getting both records.

"Go to the Toolbox tab, drag in a query calculation, and set the expression to be maximum([your date time field] for [your record id])"

Thank you for your time.



Title: Re: Getting the record to show only based on the maximum date
Post by: Cognos_Jan2017 on 20 Feb 2018 12:46:24 PM
Quoteset the expression to be maximum([your date time field] for [your record id])"

Try, as a Summary Filter, in your Query ...
[your date time field]=Maximum([your date time field] for [your record id])

HTH, Bob
Title: Re: Getting the record to show only based on the maximum date
Post by: gosoccer on 20 Feb 2018 01:52:43 PM
This approach worked perfectly Rob. Greatly appreciate it.  :) :)
Title: Re: Getting the record to show only based on the maximum date
Post by: Cognos_Jan2017 on 20 Feb 2018 02:03:56 PM
Happy to help.

Thank you, Bob