• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

IBM COGNOS Report Query Question: Limiting a list to only the latest entry for a given MsrCd

In a Performance Measure History table is a list of when the users periodically key in their  info regarding their targets.
However, for most of the requested reports all that is wanted is the latest entry for a given Measure.  Measures are uniquely identified with a MsrCd#.
The History table not only has a unique date/time of entry, but each entry in the table creates a unique sequential ID.
None of the reports want to see either the entry date, MsrCd or the ID, and I have unsuccessfully been attempting to -behind the scenes- create such a filter, via “Data item”,  “Filter”, Query Calculation, etc. using the below syntax.  On occasion the syntax gets approved, but I do not accomplish my goal.

maximum ( [PM View prd].[DataTarget History].[ID]  for  [PM View prd].[DataTarget History].[MsrCd]  )

Assistance please.
0
willjx
Asked:
willjx
1 Solution
 
RWrigleyCommented:
Probably the easiest way I can think of is to create a dataitem like:
rank([PM View prd].[DataTarget History].[ID]  for [PM View prd].[DataTarget History].[MsrCd]  )

Then add a detail filter for [rankMSR] = 1
0
 
willjxAuthor Commented:
Thank you very much.
You just saved me innnumerable hours of trial and error attempts. I was totally on a different track.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now