COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Business Insight Advanced / Cognos Workspace Advanced => Topic started by: gosoccer on 26 Oct 2017 01:05:57 PM

Title: MAXIMUM of a Date Field to show only max date. Workspace Advanced
Post by: gosoccer on 26 Oct 2017 01:05:57 PM
Does anybody know what I can do to get a maximum of certain date field that includes hours and minutes as well.

1111 Dec 15, 2016 2:30 Pm
1111 Dec 15, 2016 1:00 Pm

For the same exact record id.

Pls help if you can. Very important.

Thanks :) :)
Title: Re: MAXIMUM of a Date Field to show only max date. Workspace Advanced
Post by: MFGF on 27 Oct 2017 03:42:31 AM
Quote from: gosoccer on 26 Oct 2017 01:05:57 PM
Does anybody know what I can do to get a maximum of certain date field that includes hours and minutes as well.

1111 Dec 15, 2016 2:30 Pm
1111 Dec 15, 2016 1:00 Pm

For the same exact record id.

Pls help if you can. Very important.

Thanks :) :)

Hi,

Yes - what issues are you experiencing?

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])

Cheers!

MF.
Title: Re: MAXIMUM of a Date Field to show only max date. Workspace Advanced
Post by: gosoccer on 27 Oct 2017 06:09:26 AM
Well, that's what I used but the Cognos Server was timing out and go even dispather error. It seems like
with a little dups involved, the Cognos 10 is chocking. It seems like Cognos 11 (Analytics) is doing so much better for
the same query in "Report"

Trying it this morning with less users involved.
Thanks
Title: Re: MAXIMUM of a Date Field to show only max date. Workspace Advanced
Post by: gosoccer on 30 Oct 2017 01:03:00 PM
No luck after using the maximum([your date time field] for [your record id]). The dates are based on different Hours and Minutes and not dates. I think that's maybe why it is not working.

In some cases, it is a minute off between the latest and the one before.

Thanks for your time
Title: Re: MAXIMUM of a Date Field to show only max date. Workspace Advanced
Post by: MFGF on 31 Oct 2017 04:33:55 AM
Quote from: gosoccer on 30 Oct 2017 01:03:00 PM
...The dates are based on different Hours and Minutes and not dates...

Are you saying the values are just times with no dates?

MF.
Title: RESOLVEDRe: MAXIMUM of a Date Field to show only max date. Workspace Advanced
Post by: gosoccer on 31 Oct 2017 07:24:36 AM
The values are date and time but I figured it out. The following did the trick.

maximum(distinct [Data Item], for Unique Record ID)
I took off the column that was causing the duplication from the listing also.

Thanks, for your time