COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bucketfoot on 12 Nov 2009 09:03:10 AM

Title: Filtering for duplicates in Report Studio?
Post by: bucketfoot on 12 Nov 2009 09:03:10 AM
Hello,

I am new to the world of Cognos and am trying to figure out how to identify duplicate records within a Report Studio query, so that I can remove them in my final output.

My data set has multiple lines for a given item (Serial_Num) and I only want to include the one for each item that I am identifying as the highest priority (using a calculation that looks at multiple fields and ranking them 1 to 5).

My thought process had been to pull the base data in one query and sort it first by the Serial_Num, then by my calculated priority. I had hoped to use a second query that would use the prevMember function to create a duplicate flag for me that I could then use to filter out the unwanted records (did this in the past using the Previous function in Crystal Reports). However it does not look like the prevMember function works in this fashion

I guess my ultimate question is, is there a function that will allow you to compare fields from one record to another? If not, does anyone have any suggestions on how to handle this?

Thanks
Title: Re: Filtering for duplicates in Report Studio?
Post by: Sreeni P on 16 Nov 2009 12:35:58 PM
first of all make clear ur problem to other, any ways ur asking like "Filtering for duplicates in Report Studio", in cognos it is simple way to eliminate the duplicates using 'Group' function, or else u can do it using Distinct key word on particular data item.